<script type="text/javascript"><br />
document.location.href="write xsl code here to url of page you want to redirect to";<br />
</script>
[/code]
the disadvantage of this is that its client side javascript so if someone has it turned of it wont redirect. The other way would be to write xslt extension and redirect that way see here for more information. Its a bit more work but its all server side. Another alternative would be to move your stuff out of xslt and put in template and use inline c# eg
Or, use other options as described in this post http://forum.umbraco.org/yafpostst8431Grouping-pages-into-a-subnav-but-without-an-intro-page-going-automatically-to-the-first-page.aspx
Depends on your needs and how you'd like to solve this.
How can I auto redirect to a child node if a parent only have one child
In xslt, I want to list a node's children, but when the node only has one child, I want to auto redirect to that child node.
Who can help me?
sun,
There are 2 ways you could do this:
1. In the xslt write out :
[code]
[/code]
the disadvantage of this is that its client side javascript so if someone has it turned of it wont redirect. The other way would be to write xslt extension and redirect that way see here for more information. Its a bit more work but its all server side. Another alternative would be to move your stuff out of xslt and put in template and use inline c# eg
[code]
[/code]
Regards
Ismail
Or, use other options as described in this post http://forum.umbraco.org/yafpostst8431Grouping-pages-into-a-subnav-but-without-an-intro-page-going-automatically-to-the-first-page.aspx
Depends on your needs and how you'd like to solve this.
Regards,
/Dirk
is working on a reply...