We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32038
    • 26 Posts
    I was working on a reflect archive listing for my blog based on the default template. I wanted to alter the layout a bit, but started with the default. The item template looks like this...

    <li class="reflect_item">
        <a href="[~[+id+]~]" title="[+pagetitle+]" class="reflect_item_link">[+pagetitle+]</a> (<span class="reflect_date">[+date+]</span>)
    </li>
    


    It produces output like this (with the rest of the templates used as well...

    * 2010
    o March
    + Blog Post Two (Title) (30-Mar-10 15:56)
    + Blog Post One (Title) (30-Mar-10 15:55)
    o April
    + Blog Post Three (02-Apr-10 13:03)

    I would like to remove the
    <span>
    as I don’t need the date/time outputted.

    <li class="reflect_item">
        <a href="[~[+id+]~]" title="[+pagetitle+]" class="reflect_item_link">[+pagetitle+]</a>
    </li>
    


    But when I do, it messes with the output and looks as the following...


    * 1969
    o December
    + Blog Post Three
    + Blog Post Two (Title)
    + Blog Post One (Title)

    Is the [+date+] necessary and if so, what’s the best way to handle without actually outputing to the screen?

    Thanks!

    Craig
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Try moving the () to inside the span, then in your CSS you can use .reflect_date{display:none;}
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 32038
        • 26 Posts
        This appears to work but I was after the "why" as much as the "how".

        Thanks for the help!

          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I haven’t really looked into the code, but it looks like it uses that data to sort out its date-based structure.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org