Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Thomas Enggaard Christensen 24 posts 49 karma points
    Nov 20, 2009 @ 11:24
    Thomas Enggaard Christensen
    0

    Changing template at runtime

    Hi.

    Is there a way to change the template for a page at runtime?

    Here is my scenario:

    I have a document type with 2 templates. A "normal" template for rendring the document in the website design. And a "fullscreen printer friendly" template.

    On the normal template theres a "View printer friendly" button, that should should change the template to the printerfriendly version.

     

    The 2 fields and the button are placed in a .net usercontrol. What i wanted to do was in the Click event of the button change the template, during the postback.

    The template property on the Node object is readonly though.

     

    Anyone have a good idea to solve this without having to crate a dublicate node in content view.

  • dandrayne 1138 posts 2262 karma points
    Nov 20, 2009 @ 11:50
    dandrayne
    0

    Again, not sure if this answers your Q but see my response here: http://our.umbraco.org/forum/using/ui-questions/5431-How-to-set-alternate-template-for-the-node

    Dan

  • Thomas Enggaard Christensen 24 posts 49 karma points
    Nov 20, 2009 @ 13:37
    Thomas Enggaard Christensen
    0

    Hi Dan

    That did exactly what I wanted to do :)

    Thanks a lot.

Please Sign in or register to post replies

Write your reply to:

Draft