Copied to clipboard

Flag this post as spam?

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


  • Torbjørn 12 posts 32 karma points
    Nov 02, 2009 @ 14:27
    Torbjørn
    0

    Custom properties/settings

    Hi,

    I want to use Umbraco to serve multiple sites with the same structure. I need one "page" (or document type?) to specify global settings that will be common for all sites, and another "page" that will enable Umbraco-users to modify settings that will be specific for each site.

    My plan is to use the 1st level as different sites. One of the "first level" nodes I am thinking to use as the global settings page, and below the "sites", I am planning to have another document type to hold the site-specific settings.

    First I need to hide the settings pages from public view (probably simply by not exposing the values in the template, or deleting the entire template?). Next I need to access the settings in the sites - both the global settings and the settings that are specific to each site.

    Then to my question (assuming that my plan above makes sense): can I use XPath/Xslt to extract data in nodes at a higher level than $currentPage? Or is there a simpler way?

    (The settings are to be passed to a Silverlight client, so I must expose it as XML for parsing - I cannot use CSS properties).

  • Stephan Lonntorp 195 posts 212 karma points
    Nov 02, 2009 @ 14:53
    Stephan Lonntorp
    0

    $currentpage/ancestor-or-self::node/data[@alias='myProperty'] will get you the value of the property recursively up the tree.

  • Torbjørn 12 posts 32 karma points
    Nov 02, 2009 @ 15:59
    Torbjørn
    0

    Great, thank you!

Please Sign in or register to post replies

Write your reply to:

Draft