Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-01 16:46:36

hass
Member
Registered: 2004-04-23
Posts: 13

Article Display Options

My blog has a main content area and a sidebar. I’m trying to create a new category that will display in the sidebar of all pages but not the main area. If I set an article in that category to hidden and use txp:article status-“hidden” the front page displays right but the article won’t appear on my other pages. If I set status to Live and use txp:article category=“foobar” he sidebar is right on all pages but the article also appears in the main area. What am I overlooking?

Thanks.

Offline

#2 2007-02-01 19:31:46

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Article Display Options

Clarification: Do you want a whole category listing in the sidebar? Do you want to exclude the entire category in the main area?

Offline

#3 2007-02-01 20:49:14

hass
Member
Registered: 2004-04-23
Posts: 13

Re: Article Display Options

Exclude the category entirely in the main area, display the most recent category article only in the sidebar (limit=“1”).

Thanks.

Offline

#4 2007-02-01 21:14:32

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Article Display Options

It would be easier if you use a section instead of category: set for this section ‘display on front page’ to ‘no’, and use <txp:article_custom section="..." limit="1" /> in the sidebar.

You can do it using a category though. In the article form with which you display the article(s) in the main content:

<txp:if_article_category name="...">
<txp:else />
<txp:title />
<txp:body />
etcetera
</txp:if_article_category>

And in the sidebar <txp:article_custom category="..." limit="1" /> (make sure you don’t use the same article form here).

Offline

#5 2007-02-01 22:12:05

hass
Member
Registered: 2004-04-23
Posts: 13

Re: Article Display Options

Perfect, easy as pie using a section. Thank you.

Offline

#6 2007-02-01 22:44:59

hass
Member
Registered: 2004-04-23
Posts: 13

Re: Article Display Options

BTW, for the curious, here’s the site, the new section is Babe O’ the Day…

http://pxclassic.net/ssdd/

Offline

Board footer

Powered by FluxBB