I believe this is very simple, but for some reason, I'm not getting this to work. I am making a template for a blog within Umbraco and I am using the following code for my title
The first two lines work perfectly. The third line does not. I followed the example in the API Cheatsheet and only changed how the date should be formatted and that I wanted to use createDate instead of updateDate.
A little bit confused here. New to Umbraco and XSLT so hopefully is a simple misunderstanding.
You cannot have xslt directly on a template. A template is a standard .NET masterpage and can only have ;NET controls. However you can use inline xslt on the Item control.
Also, if you're a .NET developer you should notice that you can put standard .NET controls directly onto the template, rather than embedding it via a macro.
Adding Date to Page Title
I believe this is very simple, but for some reason, I'm not getting this to work. I am making a template for a blog within Umbraco and I am using the following code for my title
The first two lines work perfectly. The third line does not. I followed the example in the API Cheatsheet and only changed how the date should be formatted and that I wanted to use createDate instead of updateDate.
A little bit confused here. New to Umbraco and XSLT so hopefully is a simple misunderstanding.
Thanks.
Hi Andrew,
You cannot have xslt directly on a template. A template is a standard .NET masterpage and can only have ;NET controls. However you can use inline xslt on the Item control.
The following line should work
Cheers,
Chris
Thanks a lot Chris! That worked perfectly and also helped me understand how all this works a lot better. So if I have this straight -
templates are .NET pages and the xslt is either contained like you have shown or used via macros?
Yep, completely correct!
(the only third option for xslt is to use http://our.umbraco.org/projects/xsltresult... but this really just extends the xslt ability of 'umbraco:item')
Also, if you're a .NET developer you should notice that you can put standard .NET controls directly onto the template, rather than embedding it via a macro.
is working on a reply...