November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi James,
The property will be created but there won't be any code accessor for it. You need to fetch it using for instance CurrentPage["Canonical"]. Alternatively use Page Type Builder which allows you to define page types and properties in code.
Thanks Joel,
The fetch solution worked perfectly! I will start reading up on page type builder, as I expect this will be very useful in future.
Hi all,
I am hoping that you can point me in the right direction to resolve an issue I am facing.
I have written code to insert a canonical url into the pages source. The URL is pulled from whatever has been in the Canonical property on the page.
Here is the code:
I have created the propery in the pagetype of the homepage using Admin Mode > Page Types > Add Property.
However, when I attempt to load the page I see CS0103: The name 'Canonical' does not exist in the current context.
Am I incorrect in thinking that the property is being correctly created using this method? If so, how should I be creating it for this to work correctly?
Thanks in advance for your help!
James