We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2581
    • 10 Posts
    Hi everyone

    I am currently trying to associate an icon with groups of pages in a folder realating to news:

    Press Coverage
    - Item 1
    - Item 2
    - etc

    News
    - Item 1
    - Item 2
    - etc

    I created a tv called categoryIcon and associated it with my news template and made the default value @INHERIT and I am calling it from ditto using the following:

    <ul id="date-archive">
    [[Ditto?parents=`75,77,83` &amp;summarize=`10` &amp;extenders=`summary` &amp;dateFormat=`%A %d %B %Y` &amp;tpl=`news-preview` &amp;removeChunk=`Comments`]]
    </ul>


    and the chunk looks like this:

    <li>
    <h3><img src="[*categoryIcon*]" alt="" />&nbsp;<span>[+date+]</span>
    <a href="/[~[+id+]~]" title="[+title+]">[+title+]</a></h3>
    <span>&nbsp;-&nbsp;</span><p>[+summary+]</p>
    </li>

    I am adding the icon to the top level page and trying to make it cascade but it seems to be going wrong, does anyone have any suggestions?

    Thanks
      Loving modx but hating too... is that a love hate thing or what?
      • 2581
      • 10 Posts
      Okay, I have the inherit working however I am still faced with an issue. My document tree was a little inaccurate, it should have gone:

      News
      - Press releases
      --etc
      --etc
      - Press Coverage
      --etc
      --etc

      On the press release and press coverage overview pages the icons work fine but I also display *all* items on the news overview ad the icons do not show, I am assumign this is because I am calling multiple parents in the ditto call. Is there a way I can work around this?

      TIA
        Loving modx but hating too... is that a love hate thing or what?