Im using Yearly archives to display articles by month:

{exp:low_yearly_archives channel="news" start_month="1" status="not closed" sort="desc" show_future_entries="no" start_year="" end_year=""} 
    {if num_entries > 0} 
      {month} / {num_entries} 

I also have the EE mini calendar tag in my template.

I'm trying to get the calendar tag to display the current month regardless of the url created by yearly archive tag.

For example, I want December to show in the calendar tag but if I click on month links created by Yearly archive such as January and the url becomes: news/month/2012/1/ the calendar changes to January and doesnt say on December. Ive tried playing about with dynamic="no" to no avail.

The beginning of my calendar tag looks like this:

{exp:channel:calendar channel="events" switch="calendarToday|calendarCell" start_day="monday" leading_zeroes="yes" show_future_entries="yes" show_expired="no" dynamic="no"} 

{date format="%F %Y"} 

Any ideas. Thanks


As I stated in the GetSat thread as well, this isn't an issue that has anything to do with Low Yearly Archives per se. It's native behaviour for the channel:calendar tag to change the month displayed by what's present in the URI. Even if you didn't put a LYA tag there, you'd still be able to change it by just simply adding /YYYY/MM to the URI.

That said, you should probably look at the month= and year= parameters and hard-code them using {current_time}. Something like this:

    month="{current_time format='%m'}"
    year="{current_time format='%Y'}"

Untested, but I'm guessing that's your best bet.

  • 1
    Hi Low, I understood what you were saying over on your help forums that this was not an issue with LYA but I thought I should illustrate the situation. Thanks for the tip with using {current_time}. It seems to do the job.
    – Kippi
    Dec 5 '12 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.