Is your 'Contact' page a different DocumentType to the other pages?
If I've understood correctly I think you have two options, when you are writing out your navigation partial, there is presumably some kind of foreach loop and a call to .Url() to generate the Url for when people click it... you could, inside this foreach loop, check if the type of page, is your contact page Document Type and if so write out the link as .Url() + "?type=std"
or you could create a custom 'UrlProvider' and target the Contact Document Type, so that whenever .Url() is called on the Contact page, your custom Url Provider takes over and appends the querystring:
Presumably though ?type=std sets the type of Contact you want to page to be a 'standard' one? so why not make the absence of a querystring 'meant that' - if you want that as the default??
Add query string to node?
Is it possible to add a query string to a node/page I created in Umbraco?
Example of my site:
Site
--Products
--Contact
--About
When someone clicks Contact the URL is
Instead I would like to have it as
Thanks
Hi Dean
Is your 'Contact' page a different DocumentType to the other pages?
If I've understood correctly I think you have two options, when you are writing out your navigation partial, there is presumably some kind of foreach loop and a call to .Url() to generate the Url for when people click it... you could, inside this foreach loop, check if the type of page, is your contact page Document Type and if so write out the link as .Url() + "?type=std"
or you could create a custom 'UrlProvider' and target the Contact Document Type, so that whenever .Url() is called on the Contact page, your custom Url Provider takes over and appends the querystring:
https://our.umbraco.com/Documentation/Reference/Routing/Request-Pipeline/outbound-pipeline#custom-url-provider
Presumably though ?type=std sets the type of Contact you want to page to be a 'standard' one? so why not make the absence of a querystring 'meant that' - if you want that as the default??
regards
Marc
is working on a reply...