I have a parent directory which contains a sub directory or just a page.
I would like to have the option to redirect these directory and or pages using a macro/xslt.
I'm struggling to go through each node from parent to page in order to redirect. Does anyone have a sample I could follow/use so that if the directory/page had a value to redirect then it does it?
Personally, I don't know enough about xlst. It's not something I've had to do before. However you can do your redirect in your cshtml template file.
I've used code like this for something in a project recently that had a load of nodes that were effectively "redirect" nodes. You could extrapolate the concept and use it in your own templates:
Redirect sub page
I have a parent directory which contains a sub directory or just a page.
I would like to have the option to redirect these directory and or pages using a macro/xslt.
I'm struggling to go through each node from parent to page in order to redirect. Does anyone have a sample I could follow/use so that if the directory/page had a value to redirect then it does it?
Hi Bob,
I was wondering if you could give a bit more of an explanation of your setup and what you are trying to achieve. I'm not exactly sure I understand.
Nik
Yes sure.
I have a site, first level is Managers, under managers is a second level called supervisor and below this is a page called users.
What I would like to do is if a user types in
Mysite.com/manager
To redirect to a chosen page (external or internal)
If they navigate to
Mysite.com/manager/supervisor or / user then it should redirect to the page that had been set.
In my document type I have created the option to allow users to redirect to a specific page but need some help in getting this to work using xlst.
Does this make more sense?
Thanks for your help
Hi Bob,
So there are various ways you could do this.
Personally, I don't know enough about xlst. It's not something I've had to do before. However you can do your redirect in your cshtml template file.
I've used code like this for something in a project recently that had a load of nodes that were effectively "redirect" nodes. You could extrapolate the concept and use it in your own templates:
is working on a reply...