Copied to clipboard

Flag this post as spam?

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


  • saivignesh 2 posts 72 karma points
    Aug 26, 2015 @ 07:14
    saivignesh
    0

    using umbraco field in two templates

    Hi, I am new to umbraco7 i have created the content for one template and i inserted in the template it works perfectly.But i need the same content to be displayed on another template. How to do this please any help me.

    Thankx in advance

  • Mark Bowser 273 posts 860 karma points c-trib
    Aug 26, 2015 @ 23:45
    Mark Bowser
    0

    Just to make sure we're on the same page, you have a content tree with content (maybe like this):

    Home
        About Us
    

    You've set the About Us page up with a template already. You want to create a second template, so you could render the About Us page with either template. Is that right?

    You can assign many different templates as allowed templates to a document type on the document type definition in the Settings section. They you can go to the properties tab on the content in the content tree to switch templates for that node.

    If you don't want to have to manually switch back and forth, you can use alt templates. If you had two templates (maybe like this):

    MasterContentPage
        ContentPage
            OneColumn
            TwoColumn
    

    If your About Us page has selected Two Column as its template, you can render your About Us page with the Two Column template with a url like this:

    http://mywebsite/about-us/twocolumn
    

    Just append the name of your template to the end of the url and Umbraco will render that node with the template you specify.

    Does that help? Or am I way off the mark?

Please Sign in or register to post replies

Write your reply to:

Draft