I need to be able to create a NiceUrl including an alttemplate. It is easy to create the nice url using umbraco.library:NiceUrl, but how can I add an alttemplate to this url?
For instance I would like to create an url to 'profile.aspx' with the alttemplate 'simple' making the complete url look like this: profile/simple.aspx - and not like profile.aspx?alttemplate=simple.
Create NiceUrl with alttemplate
I need to be able to create a NiceUrl including an alttemplate. It is easy to create the nice url using umbraco.library:NiceUrl, but how can I add an alttemplate to this url?
For instance I would like to create an url to 'profile.aspx' with the alttemplate 'simple' making the complete url look like this: profile/simple.aspx - and not like profile.aspx?alttemplate=simple.
I have version 4.0.3 installed
Hi Morten
This is a bit hacky and untested but it may work. Instead of calling niceurl youi could create a template to call which will do a replace on your url
Then instead of
you'd use
Worth a shot!
Dan
Hi Dan.
It is hacky, but it works - at least when I enter the missing dash in "with-param" ;)
Thank you!
is working on a reply...