Hey,
I have a news channel, but on my archives, its showing months in the archive list when no entries where made in that month.
Any help would be appreciated.
Steve
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
April 16, 2012 3:38am
Subscribe [2]#1 / Apr 16, 2012 3:38am
Hey,
I have a news channel, but on my archives, its showing months in the archive list when no entries where made in that month.
Any help would be appreciated.
Steve
#2 / Apr 17, 2012 9:55am
Hi Steve,
I’m sure we can get you the output you are after, we just need a bit more context to get you the best response possible.
What version of ExpressionEngine are you using?
Please post the code you are using in your template so I can see exactly what you’re using here.
I look forward to your response!
Cheers,
#3 / Apr 17, 2012 9:59am
Hi Dan,
Thanks for getting back.
EE version 2.3.1
{if segment_1=="news" OR segment_2=="news"}
<div class="sidebar_archives">
<h3 class="archives">News Archive
by Month</h3>
{exp:channel:month_links channel="news" limit="50" orderby="date"}
<a href="http://{path=news/archive}">{month}, {year}</a>
{/exp:channel:month_links}
</div>
{/if}#4 / Apr 19, 2012 2:55pm
Hey Futuristonline,
Thank you for posting your code.
Can you tell me what the results are if you just use this block of code in a new template?
{exp:channel:month_links channel="news" limit="50" orderby="date"}
<a href="http://{path=news/archive}">{month}, {year}</a>
{/exp:channel:month_links}Cheers,
#5 / Apr 19, 2012 3:29pm
Hey Shane,
Thanks for the reply.
Still get a list of all the months. Its really a weird one this.
Steve
#6 / Apr 19, 2012 3:39pm
Sorted.
The channel name was wrong! Dhoooooo
Should have been latest_news not news.
Its sometimes the simplest things.
Thanks for your patients guys.
Steve
#7 / Apr 20, 2012 1:48pm
Hey Futuristonline,
It’s almost always some small detail that takes the longest to track down. The major one, those just show themselves. 😊
Really glad you are all sorted.
Have a great weekend and if you need anything else, please just let me know by opening a new thread.
Cheers,