Copied to clipboard

Flag this post as spam?

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


  • Jamie Wu 19 posts 79 karma points
    Jul 13, 2011 @ 14:00
    Jamie Wu
    0

    Sidebar widgets rendering problems (v4.7)

    I followed Hendy's blog article (Sidebar widgets with Umbraco V4) and am suffering problems on rendering the widgets. Can anyone who did it give a help please?

    My content tree shows below:

    - Home 
     -- Page 1
     -- Page 2
     -- Sidebar Widgets
      --- widget 1
      --- widget 2

    ..........

    As following the article, the Sidebar Widgets is a DocType folder in every content page using a data type of ultimate picker to include a checkbox list (e.g. widget 1, widget 2). I am using a user control macro with a string parameter 'Widgets'. The control has an asp:Repeater control for the rendering. But I don't quite understand the line below on what recursive value should be in the Widgets property. 

    <umbraco:Macro Alias="sidebarWidgets" Widgets="[$sidebarWidgets]" runat="server"/>

    Is $sidebarWidgets just the alias of the user control or the NodeID of the folder or something else? 

    I might not express myself well. Thanks

     

  • Rich Green 2246 posts 4008 karma points
    Jul 13, 2011 @ 14:31
    Rich Green
    0

    Hi,

    The $ notation tells umbraco to look up the tree until it finds a value for the property you're looking for.

    So [$sidebarWidgets] means that umbraco will go up the tree and look for the first sidebarWidgets property that is not empty.

    Rich

  • Jamie Wu 19 posts 79 karma points
    Jul 14, 2011 @ 00:05
    Jamie Wu
    0

    Thanks for the hint! Rich. I can understand how the recursive thing works in umbraco now.

    I was struggled on which value should put after $ notation. I tried various values from macro name to content node id but none of them works. Actually it should be the alias of the ultimate picker defined in the docType. I am still learning umbraco and hope to get more ideas from here. 

Please Sign in or register to post replies

Write your reply to:

Draft