ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

month_links inside entries tag

March 26, 2011 12:21pm

Subscribe [1]
  • #1 / Mar 26, 2011 12:21pm

    sambo

    80 posts

    Hi,

    I am using this code ( simplified ) to display a yearly archive:

    {exp:channel:month_links channel="news"}
    {year_heading}{year}{/year_heading}
    {/exp:channel:month_links}

    It works perfectly when it is not within a channel:entries tag. But in one of my templates I need to output this list inside a channel:entries tag. 

    It is the template that displays a single news article and I think that confuses the month_links thing. It outputs the year of that article multiple times.

    Any way to prevent that?

  • #2 / Mar 27, 2011 9:35am

    sambo

    80 posts

    I solved it by moving the code into an embedded template.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases