Copied to clipboard

Flag this post as spam?

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


  • Uros Sankovic 107 posts 134 karma points
    Jul 11, 2010 @ 08:42
    Uros Sankovic
    0

    Two "main" pages question

    Hi,

    I have two home pages (default, home). Which one opens depends on the user. But the subpages (content) are the same for both of them.Is it ok if I have the following structure in Umbraco?

    Content

    default

    home

    about

    products

    contact

    ...

     

    If I use macro, will both home pages (default and home) read from subpages?

    THX for your help

     

    Uros

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 11, 2010 @ 10:35
    Dirk De Grave
    0

    well, you don't have subpages on the default node, so iterating child nodes when on that page doesn't make sense... as you don't have any.

    If you have the same content for both home pages, I'd suggest to introduce another page on the same level of default and home (let's call that one 'Pages' and move all childnodes of 'home' node under the node 'Pages' node). From there on, write your xslt macro to list child nodes of the 'Pages' node, and that macro can then be used on both the 'default' and 'home' node. 

    Or, if you'd like to keep the existing structure, create a macro that accepts a parameter of type 'content picker' and use that macro on the templates for both 'home' and 'default' page and set it to 'home' node. Macro and xslt will then use that parameter value to list all subnodes.

     

    Does that make sense?

     

    Cheers,

    /Dirk

  • Uros Sankovic 107 posts 134 karma points
    Jul 11, 2010 @ 14:33
    Uros Sankovic
    0

    THX Dirk,

    I'll go with the first suggestion. I'll get back to you to let you know how it goes. THX again.

    Uros

  • Uros Sankovic 107 posts 134 karma points
    Jul 11, 2010 @ 17:12
    Uros Sankovic
    0

    I'm getting little lost.I'm new to Umbraco and pretty new to XSLT. If i understand you, macro will read all the nodes of the "Pages". What do you mean by that that macro can be then used on "default" and "home" node? Maybe stupid question - how do I use macro on node? So far I used macros in templates.

    The macro should be something like the macro from Blog, which lists child nodes. Am I close?

    THX for your patience 

     

    Uros

  • Uros Sankovic 107 posts 134 karma points
    Jul 11, 2010 @ 18:49
    Uros Sankovic
    0

    Found this tutorial. Looks like something I'm looking for. Am I right?

    http://umbraco.org/documentation/books/re-use-content 

    Except the part where they are talking about limitations. I'm going to use DOC2Type on "Contact"

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 11, 2010 @ 20:49
    Dirk De Grave
    0

    Hi Uros,

    Sounds like a good solution to your "problem". Good luck with it and don't hesitate to ask more questions if you still have some.

     

    Cheers,

    /Dirk

Please Sign in or register to post replies

Write your reply to:

Draft