Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-17 12:20:17

ballmann
Member
Registered: 2006-10-14
Posts: 37

how do i make a "placeholder"-random-list of articles?

hi everybody!

i use for my website (which is divided in three columns – main-navigation on the left side, headlines of articles in the middle and the complete article on the right side) some code for a section containing categories and links which shows a list of random links UNTIL i click on a specific category to show only the links contained in this category. this is the code:

<code>
<div id=“column_2”>
<txp:category_list active_class=“active” type=“link” section=“beloved” />
</div>
<div id=“column_3”>
<txp:if_category>
<txp:asy_wondertag><txp:linklist category=”<txp:category />” /></txp:asy_wondertag>
<txp:else />
<txp:linklist limit=“10” sort=“rand()” />
</txp:if_category>
</div>
</code>

now i search for a way to do similar stuff with two sections which contain articles. until someone clicks on one of those article-headlines (what results in the complete article shows up in the right/third column) i want a random list of article headlines showing in this third column.
i tried to alter this category-code above for this task but it doesn´t work: it ALWAYS shows the random list even when i click on an article headline.

the CURRENT code for the article-section looks like this:

<code>
<div id=“column_2”>
<ul>
<txp:article_custom form=“liste” limit=“60” section=“References” sort=“Title asc” />
</ul>
</div>
<div id=“column_3”>
<txp:article form=“article_references” limit=“1” sort=“Title asc” />
</div>
</code>

any ideas how to get this random-placeholder-list?

Offline

#2 2007-12-17 14:45:17

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: how do i make a "placeholder"-random-list of articles?

I’m not exactly sure what you want to happen but maybe using the <txp:if_article_list> or <txp:if_individual_article> tags with <txp:else /> in the right places??


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2007-12-17 15:19:46

ballmann
Member
Registered: 2006-10-14
Posts: 37

Re: how do i make a "placeholder"-random-list of articles?

HEYYES :-)
<txp:if_individual_article> did the trick!

thank you very much, stuart!

regards and best christmas-and-new-year-wishes
from hamburg/germany,
matthias

Offline

#4 2007-12-17 18:52:21

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: how do i make a "placeholder"-random-list of articles?

Hamburg – been there – very nice. Been down the lift and through the tunnel under the river to the port as well. All in a taxi. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB