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.

Trouble to show the titles and links of entries from an specific channel from an specific year and an specific month

April 02, 2012 6:39pm

Subscribe [2]
  • #1 / Apr 02, 2012 6:39pm

    jecampos

    10 posts

    Hello Friends

    Would you please guide me how to show the titles and links of entry from an specific channel from an specific year and an specific month. By the moment I am trying to do something like this:

    <!———————-
    <li class=“widget”>

    archivo

      <ul class=“archive”>
      {exp:channel:month_links channel="planeta"}
      <li>{year}
      <ul>
        <li>{month}
        <ul class=“post-names”>
        <li>{title}</li>
        </ul>
        </li>
      </ul>
      </li>
      {/exp:channel:month_links}
      </ul>
    </li>
    ———->

    This code must create a list like this:

    2012
    March
    First title of my recent entries on March, 2012
    Second title of my recent entries on March, 2012

    2011
    August
    First title of my recent entries on August, 2011
    Second title of recent entries on August, 2011

    2010
    May
    First title of my recent entries on May, 2010
    Second title of my recent entries on May, 2011

    Thanks in advance for your help

    Jhon E.

  • #2 / Apr 03, 2012 4:42pm

    Shane Eckert

    7174 posts

    Hey jhonfields,

    This can be done with the channel entries tag.

    Give this a try.

    {exp:channel:entries channel="blog"}      
    {date_heading display="monthly"}                 
    <h1>{entry_date format="%Y <br> %F"}</h1>
    {/date_heading}
    <a href="http://{path=stuff}">{title}</a>
    
    {/exp:channel:entries}

    I hope this helps!

    Cheers,

  • #3 / Apr 18, 2012 1:39pm

    jecampos

    10 posts

    Thanks for your help Shane

    This works fine.

    Is there any other way?

    I have to put href to the year and the month that contains entries in order to add JavaScript to open and close Years and months list entries.

    Thanks in advance

    Jhon E.

  • #4 / Apr 19, 2012 1:36pm

    Shane Eckert

    7174 posts

    Hey jhonfields,

    There are several ways to approach this.

    You might also consider an Add-On like Archives.

    I can also move this over to the Community Help Forum where you can get some more ideas.

    Please let me know.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases