Copied to clipboard

Flag this post as spam?

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


  • Simon 24 posts 64 karma points
    May 21, 2014 @ 16:24
    Simon
    0

    ContentTree Macro Parameter

    Hi, I am going through the process of creating a site with the newest version of Umbraco. In Umbraco 6 I was able to select a parameter in a macro called contentTree. However in Umbraco 7 it seems there are a lot fewer parameters to choose from and contentTree is one of these missing. Is there something I should be using instead?

    Any help is greatly appreciated.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 21, 2014 @ 18:21
    Jan Skovgaard
    0

    Hi Simon

    What exact version of 7 are you using? Unfortunately there has been some issues with parameters in the 7.1.2 release, which may be what you're struggling with. But hard to say when not knowing the version number :)

    /Jan

  • Simon 24 posts 64 karma points
    May 22, 2014 @ 10:24
    Simon
    0

    Hi Jan, thanks very much for your reply. I only started attempting this yesterday so I am on 7.1.3 which I believe is the latest. Below is a screenshot of what I currently have available.

    enter image description here

    Simon

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 22, 2014 @ 16:26
    Jan Skovgaard
    100

    Hi Simon

    Ok, yes v7.1.3 is the latest release.

    Never used the "contentTree" parameter much myself but yes it does indeed seem to be missing. Not sure what the reason for this is though. Could be a mistake but I'm not sure.

    What is your scenario for using it? And would it perhaps be hard to switch using the content picker for instance?

    If you think it's a bug that it's not there then perhaps try creating an issue on http://issues.umbraco.org/issues

    /Jan

  • Simon 24 posts 64 karma points
    May 22, 2014 @ 16:49
    Simon
    0

    Hi Jan, I have a news section on the site. I basically have a node with a list of other nodes under it, each of these child nodes are a news article. So I use the ContentTree to select the top node and display the news articles.

    I'll try submitting it as a bug.

    Thanks very much Jan.

    Simon

  • Simon 24 posts 64 karma points
    May 22, 2014 @ 16:59
    Simon
    0

    Looks like it had been brought up 6 months ago by somebody else but it was decided not to add it back in because they could only think of one instance it could be used in.

    Hopefully somebody will come up with a solution for me from there.

    http://issues.umbraco.org/issue/U4-3438

    Thanks again for your help Jan.

    Simon

  • Simon 24 posts 64 karma points
    May 22, 2014 @ 16:59
    Simon
    0

    Sorry duplicate post

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 22, 2014 @ 18:17
    Jan Skovgaard
    0

    Hi Simon

    You're welcome...Yeah I can see that in your scenario it does make sense to use the contentTree option.

    Don't know if you can perhaps figure out how to add the functionality yourself by having a peek at the Umbraco core perhaps? Even though this post by Richard is 4 years old I think the concept is perhaps the same however the code sample is probably outdated by now http://www.richardsoeteman.net/2010/01/04/CreateACustomMacroParameterType.aspx

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 22, 2014 @ 18:18
    Jan Skovgaard
    0

    Hi again Simon

    Just wondering...wouldn't it be possible to use the content picker? Sees like you're only selecting 1 node anyway?

    /Jan

  • Simon 24 posts 64 karma points
    May 23, 2014 @ 12:22
    Simon
    0

    Hi Jan, I thought that would work too but it doesn't display anything when I use it. Not sure if I need to change my XSLT in any way, it looks like it should be a straight swap to me though.

  • Simon 24 posts 64 karma points
    May 23, 2014 @ 13:01
    Simon
    0

    I've done some messing around to figure out why it won't work with content picker, when I use the following code:

    <xsl:value-of select="/macro/source" />
    

    It prints out the node ID, so that bit is working, but if do:

    <xsl:value-of select="/macro/source/*" />
    

    I get nothing, so it looks like it can't see the nodes below the node I am selecting using the content picker.

Please Sign in or register to post replies

Write your reply to:

Draft