We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15360
    • 20 Posts
    Somehow, I can’t get Reflect to render an archive just by years.
    The closest shot I had, was to turn on groupByYear and leave the month template blank, but that still shows a lot of empty <li>’s under every year.

    What would be the way to go?
      • 20986
      • 5 Posts
      I’ve seen this has been posted a while ago but think I’ve got a solution so for anyone else interested:

      add the following parameters to the reflect call &groupByYears=`1`&tplYearInner=`@CODE:&nbsp;`

      HTH
        • 37210
        • 131 Posts
        Hi forum..

        I’ve tried the solution from the previous post but it hasn’t worked. I am also trying to list by year.

        On a resource, I’ve put my reflect call
        [!Reflect? config=`wordpress` &targetID=`414` &getDocuments=`1` &groupByYears=`1` &dittoSnippetParameters=`parents:240,248,244` &id=`wp`!]


        and then on another page with ID 414 I’ve put the ditto call:
        [!Ditto? &id=`wp` &extenders=`dateFilter,summary` &tpl=`messagePageTpl` &parents=`240,248,244`!]


        Does anything look off to anybody?

        At the moment these calls generate this:
        * October 2010
        * September 2010
        * May 2009
        * July 2008

        but I want it to generate:
        2010
        * October 2010
        * September 2010
        2009
        * May 2009
        2008
        * July 2008

        Thanks in advance smiley
        sarah
          • 37210
          • 131 Posts
          I’ve figured out what I did wrong. I simply had to add the tplMonthInner paramater and leave it blank so that it wouldn’t list out the individual items.

          [!Reflect? &targetID=`414` &extenders=`dateFilter,summary` &getDocuments=`1` &dittoSnippetParameters=`parents:240,248,244` &id=`wp` &groupByYears=`1` &tplMonthInner=``!]


          Sweet.

          Sarah
            • 6723
            • 93 Posts
            Ok, I’ve got a Reflect archive working by year - here http://djcdesign.co.uk/blog/ but just wondering can I display the archive in a dropdown list, rather than an UL / LI list?
              • 37210
              • 131 Posts
              Do you mean a drop down menu? Have a go at changing the &tplContainer, &tplYear, &tplYearInner and &tplMonth parameters. I might be able to help you out a bit later on if you need clarification.

              The default template can be found in your assets/snippet/reflect/default.tempates.php file.

              Sarah