I'm trying to insert the name of the page onto the template but I'm having issues. In the Page template layout properties, I added:
<% CMSContext.CurrentDocument.DocumentName %>
But I get this error:
[Error loading the layout] c:\DWASFiles\sites\aon-affinity\Temporary ASP.NET Files\root\54b07d75\56ec1444\App_Web_8efbb0f0-f234-46d5-b9be-9c22b9c94d3a.ascx.76a317f9.pd9qbfa_.0.cs(280): error CS1002: ; expected
Any ideas?
Hi,
In Kentico o7 you need to use this markup:
<%= CMSContext.CurrentDocument.DocumentName %>
In Kentico 8 you need to do it through the MacroResolver class and specify the full namespace.
Best regards, Juraj Ondrus
Appreciate it Juraj! :)
Please, sign in to be able to submit a new answer.