Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-28 05:16:05

amyng
Member
Registered: 2007-01-05
Posts: 55

Archives page -- <txp:article> confusion

Hi everyone,

If you go to my archives page at http://www.remakeables.com/archives , it shows up fine. I used Michael’s way of displaying archives without rss_suparchive because it wouldn’t display the month and year previously.

My problem is, is when I click on the categories on the right, everything goes haywire.

I’m copying the TXP code on my archive_list page here:

<!— Content —>
<div id=“container”> <div id=“blog”>
<h3>Archives</h3>

<dl>
<txp:article_custom limit=“99999” form=“monthly_article” />
</dl>

</div>
</div>

<!— Sidebar right —>

<div id=“categories”>
<p>
<txp:link_to_home>All</txp:link_to_home><br> <txp:category_list section=“archives” this_section=“0” type=“article” /> </p> </div>

Question is, how do I make it display the categories when someone clicks on it while they’re on my archives page? It works fine when they’re on the main page, but not when they’re on the archives.

Any help would be great,

Thanks,
Amy

Offline

#2 2007-01-28 15:55:28

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

Re: Archives page -- <txp:article> confusion

Try replacing your article_custom tag with this:

<txp:if_category name="crafting">
<txp:article_custom category="crafting" />
</txp:if_category>
<txp:if_category name="everything-else">
<txp:article_custom category="everything-else" />
</txp:if_category>
... and so on for every category
<txp:if_category>
<txp:else />
<txp:article_custom limit="99999" form="monthly_article" />
</txp:if_category>

Or get asy_wondertag and do this:

<txp:if_category>
<txp:asy_wondertag><txp:article_custom category="<txp:category />" /></txp:asy_wondertag>
<txp:else />
<txp:article_custom limit="99999" form="monthly_article" />
</txp:if_category>

Offline

#3 2007-01-28 16:25:27

amyng
Member
Registered: 2007-01-05
Posts: 55

Re: Archives page -- <txp:article> confusion

Hey Els, thanks for responding. I uploaded the asy_wondertag plugin, and copied your tag unto the archive_list page. It displays the articles under that category when clicked alright, but there’s an error message after I click on the category links. What am I doing wrong?

Here’s the code I added in:

<!— Content —>
<div id=“container”> <div id=“blog”>
<h3>Archives</h3>

<dl>
<txp:if_category>
<txp:asy_wondertag><txp:article_custom category=”<txp:category />” /></txp:asy_wondertag>
<txp:else />
<txp:article_custom limit=“99999” form=“monthly_article” />
</txp:if_category>
</dt>

Amy

Offline

#4 2007-01-28 20:02:52

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

Re: Archives page -- <txp:article> confusion

Is ‘Production status’ set to ‘Live’ (in Admin > Preferences)? It’s just a notice, not an error, and it will probably go away if you change status to live. It says you don’t have an article tag, but you can’t have one there, you need article_custom to display articles from another section.

Offline

#5 2007-01-29 02:23:54

amyng
Member
Registered: 2007-01-05
Posts: 55

Re: Archives page -- <txp:article> confusion

Hi Els, That worked perfectly, thanks so much! :)

Offline

Board footer

Powered by FluxBB