We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Yearly Archive Plugin problems

Development and Programming

onepanman's avatar
onepanman
44 posts
16 years ago
onepanman's avatar onepanman

Have two problems, I am hoping someone can assist me with.

I am using the Yearly Archive Plugin to split out the left navigation archive section, http://life.cc/index.php/media_arts/online_sermons/category/corporate_podcast

The first problem is, it starts with January, even though I have start_month=”1” sort=”desc” in the parameters. I would prefer it to start with the latest month with entries (currently September)

The second problem. If you go to any of the last three categories (The Journey, The Source or Fusion) notice, it is splitting out additional lines <li></li> Only seems to happen when there is are no entries on some months.

Any help would be appreciated.

<ul id="nav_categories">

<?php
$ctg = "{segment_4}";
global $DB;
$results = $DB->query("SELECT cat_id FROM exp_categories WHERE cat_url_title = '$ctg'  AND group_id ='8'");
$ctg_id = $results->row['cat_id'];
?> 

{exp:yearly_archives weblog="podcasts" start_month="1" sort="desc" category="<?php echo $ctg_id; ?>" }
     {if entries_in_year > 0}
 {if leap_year == 1}  <li><a href="http://">{year}</a>{if:else}  <li><a href="http://">{year}</a>{/if}


  <ul>{months}
      <li>
        {if num_entries != 0}
          <a href="http://{path=/media_arts/online_sermons/category/{segment_4}/}{year}/{month_num}/">{month}</a>
        {/if}
      </li>{/months}
    </ul> 

  </li>
{/exp:yearly_archives}

 {!--This conditional will create a show all posts link only if an archive link was selected --}
{if segment_5 !=""}
    <li><a href="http://{site_url}index.php/media_arts/online_sermons/category/{segment_4}">Show All</a></li>
{/if}

</ul>
       
vladyn's avatar
vladyn
176 posts
16 years ago
vladyn's avatar vladyn

hello I’m using this plugin as well and I found that it doesnt display entries from this (2010) year. It does display however entries from 2008 and 2009. I have entries from 2008, 2009 and 2010, which are poping out with EE build in Monthly archive tag. Some help will be appreciated .

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.