Copied to clipboard

Flag this post as spam?

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


  • Craig O'Mahony 364 posts 918 karma points
    May 03, 2013 @ 16:48
    Craig O'Mahony
    0

    How to re-use an area of content

    Hiya folks,

    I have a 'situation' (I shan't bore you with the finer details) which is basically that i have a client that want's to be able to create content blocks that are shared by many pages within a site (Basically it's a load of blurb concerning legal qualifications). 

    So is it possible that you can create an area of content that you can use over and over again.

    Also on the same sort of subject they would like to have a central list of hyperlinks that they can insert in one or more pages. So that if they change the URL of the hyperlink it will automatically change the links on any page that's pointing to this link?

    Thanks,

    Craig

  • Rich Green 2246 posts 4008 karma points
    May 03, 2013 @ 17:11
    Rich Green
    100

    Hi Craig,

    Yes it's possible.

    Set up a Data Section outside you website, for example:

    Content

    - Home

    --------- News

    ---------  Events etc.

    --- Settings

    ---------  Legal Qualifications

    -------------- Legal 1

    -------------- Legal 2

    -------------- Legal 3 etc.

    Then add a new datatype of the type 'MultiNodeTreePicker' the user can then pick which content they want to re-use from the Settings/Legal Qualifications section.

    Hope that makes sense.

    Rich

  • Rich Green 2246 posts 4008 karma points
    May 03, 2013 @ 17:23
    Rich Green
    0

    Editied the format as it broke, just posting so you get the notifcation, hope that makes more sense.

  • Craig O'Mahony 364 posts 918 karma points
    May 07, 2013 @ 13:25
    Craig O'Mahony
    0

    Urm, I can't quite see how that's supposed to work!

  • Rich Green 2246 posts 4008 karma points
    May 07, 2013 @ 14:22
    Rich Green
    0

    Which bit?

  • Craig O'Mahony 364 posts 918 karma points
    May 07, 2013 @ 15:02
    Craig O'Mahony
    0

    Sorry for my ignorance here!!

    I'm not sure how to configure the multi selector up. I want to point the 'selector' at a particular area of content that's held in a text page? I can see that the multiselector points at a node in the content tree but not at, say, the bodyText of that page. Bit lost!

  • Rich Green 2246 posts 4008 karma points
    May 07, 2013 @ 15:05
    Rich Green
    0

    Hey Craig,

    You point the selector at a 'Node' that node could have BodyText, and Image, whichever content you need to reuse. Then in Razor or XSLT you get the ID of this node and pull in whatever content you need, think of it like grabbing content from a table in SQL which you have the ID for.

    In XSLT you use http://our.umbraco.org/wiki/reference/umbracolibrary/getxmlnodebyid-(1)

    Make any sense?

    Rich

  • Craig O'Mahony 364 posts 918 karma points
    May 07, 2013 @ 15:17
    Craig O'Mahony
    0

    Ahhh see what you're getting at!!

    Any chance of reposting that link please (it's deaded)

    Thanks,

    Craig

  • Rich Green 2246 posts 4008 karma points
    May 07, 2013 @ 15:19
    Rich Green
    0

    Hey Craig,

    It's the editor on here, broke the link, try this http://bit.ly/18SfKa2

    Rich

  • Craig O'Mahony 364 posts 918 karma points
    May 07, 2013 @ 15:36
    Craig O'Mahony
    0

    Right got the logic now!

    So I'm presuming that in XLST I'm to get the value of what node has been selected and then grab the bodyText from that ID?

    Thanks again.

    Craig

  • Rich Green 2246 posts 4008 karma points
    May 07, 2013 @ 15:39
    Rich Green
    2

    Hey Craig, 

    Sounds about right, you can use a MTNP (Multi Node Tree Picker) or a content picker in your DocType (where you want to pull the shared content into). 

    This will then hold the value of the node you need to get content from, you can then use the XSLT as above to get any info (bodyText for example) you need from that node.

    Rich

  • Craig O'Mahony 364 posts 918 karma points
    May 07, 2013 @ 15:48
    Craig O'Mahony
    0

    top banana thanks Rich

  • Craig O'Mahony 364 posts 918 karma points
    May 07, 2013 @ 18:06
    Craig O'Mahony
    0

    Hi Rich,

    I've gone about setting up the Multi content node picker. i can see it on the Content section of the nodes but I can't actually select anything from the list of nodes under the picker. Have I missed something obvious?

    Thanks,

    craig

  • Rich Green 2246 posts 4008 karma points
    May 08, 2013 @ 07:34
    Rich Green
    0

    Hey Craig,

    Sounds like you've not ticked the correct options on your datatype, have a look here http://ucomponents.codeplex.com/wikipage?title=MultiNodeTreePicker

    Make sure XPath match type is disabled.

    Rich

  • Craig O'Mahony 364 posts 918 karma points
    May 08, 2013 @ 11:14
    Craig O'Mahony
    0

    You sir are a genius!!

    Works a treat!! :)

Please Sign in or register to post replies

Write your reply to:

Draft