You are not logged in.
So I’m trying to create an archive like this;
However, the actual links won’t go to their respective page and I’d like to know what I’m doing wrong?
The page template looks like this;
<div id="content"> <ul><txp:article_custom limit=99999 form="archive-list" section="special-topics" /></ul> </div><!-- end content-->
The form looks like this;
Oh and also—for your page template, try this:
<div id="content"> <txp:if_individual_article> <txp:article /> <txp:else /> <ul><txp:article_custom limit="99999" form="archive-list" section="special-topics" /></ul> </txp:if_individual_article> </div><!-- end content-->
You need to show the article_custom unordered list if it’s an article list. But TXP is also trying to show individual articles using this page template. So you need something to do if you have an individual article on display, as opposed to a list of article links.
Last edited by maruchan (2012-06-16 04:15:00)
One additional question as I’m still trying to wrap my head around conditional statements.
I want to show all the articles for a particular section. How would I do this ?
I have a form called “sidebar” which calls from another form, “current-section” which has this;
<ul><txp:article_custom limit=“99999” form=“archive-list” /></ul>
And the archive-list form is this;
However, all articles from all sections are appearing instead of just articles from the current section.
Last edited by wispa (2012-06-18 22:25:46)
article_custom will show all articles from all sections unless you tell it not to.
For example: <txp:article_custom section=“articles, photos” /> would limit it to only articles from the “articles” and “photos” sections.
You can also use a single quote and drop the <txp:section /> tag in there, to tell it “show articles from whichever section we’re in”:
<txp:article_custom limit=“99999” form=“archive-list” section=’<txp:section />’ />
But I think most users will use <txp:article /> for this rather than article_custom, since it will show articles from only the current section by default. It will also do pagination (think: “previous” and “next” links at the bottom of the page), while it’s tricky to do that with article_custom.
Last edited by maruchan (2012-06-18 23:58:17)
Actually, I believe that will only show an articlle that I’m currently viewing. It will not show all articles within that section.
<ul><txp:article limit=“99999” form=“archive-list” /></ul>