Is there a way of showing the archive pages of one category only. 
Posted: 13 March 2006 02:31 PM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  172
Joined  11-07-2005

Is there a way of listing the archive pages of one category only.

Picked up on this thread http://expressionengine.com/forums/viewthread/5827/ but couldn’t really fathom how to do it from Lisa’s suggestion.

Any help would be greatly appreicated.

Cheers

Profile
 
 
Posted: 13 March 2006 03:25 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  124
Joined  05-14-2004

I use this:

{exp:weblog:month_links weblog="{my_weblog}" category="7"}
<a href="{path={my_template_group}/index}">{month} {year}</a><br />
{/exp:weblog:month_links}

Does that help??

 Signature 

danielphillip.com

Profile
 
 
Posted: 13 March 2006 03:35 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  172
Joined  11-07-2005

Thats great. Many thanks.

Profile
 
 
Posted: 13 March 2006 03:50 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  31267
Joined  05-14-2004

Are you sure that’s working? category= is not a listed parameter:

http://expressionengine.com/docs/modules/weblog/archive_month_links.html

 Signature 
Profile
MSG
 
 
Posted: 13 March 2006 04:02 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
RankRank
Total Posts:  172
Joined  11-07-2005

I wanted to create a glossary of terms using my weblog entries. So created a glossary category and wanted to show just the archive for that category with definition excerpts under each {title}or glossary term. So a combination of your original thread and Daniels contribution put me in right the direction.

The code I’ve come up with is as follows:

<ul>{exp:weblog:entries category="4" sort="asc" rdf="off" dynamic="off" limit="5"}
<a href="{comment_url_title_auto_path}">{title}</a>
{body}
{/exp:weblog:entries}</ul>

Seems to work but haven’t run it through the validator yet. Suspect a whole host of errors will probably emerge which is normally the case with my ugly hacks!

Would be greatful if you could let me know if you spot a glaring problem. Thanks.

Incidentally I think the problem I had was principally to do with trying to use the actual category name or alternatively C1, C2 etc label, instead of just the category number.

Profile
 
 
Posted: 13 March 2006 07:03 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  31267
Joined  05-14-2004

Yes, this is the way to do it, though I’d look at the disable= parameter, too.  You should also surround the link with li tags, to make it valid.  And this is not an ugly hack, but a valid way of templating. =)

If you wanted to do this for all categories, you could leave off the category= and then just go to the URL of that template with the C4 in the third segment.

 Signature 
Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 61001 Total Logged-in Users: 33
Total Topics: 73769 Total Anonymous Users: 21
Total Replies: 397959 Total Guests: 489
Total Posts: 471728    
Members ( View Memberlist )