Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-05 12:23:53

tez
Member
Registered: 2006-02-25
Posts: 22

(Beginner) Display entries in alphabetical order?

Hi

I can’t seem to get my entries to display in an ascending order based upon their title.

E.g.

Canadian Pubs

displays 3 pubs in the correct alpabetically order then repeats the entries with no order.

I hope this is clear and you can help.

Thanks

Tez

FYI

This is from my default page:

<code><!— center —>
<div id=“content”>
<txp:article sortby=“Title” sortdir=“asc”/>
<txp:article form=“default” />
<txp:if_individual_article>
<p>
<txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
<txp:link_to_next><txp:next_title /></txp:link_to_next>
</p>
</txp:if_individual_article>
<txp:if_article_list>
<p>
<txp:older>Previous</txp:older>
<txp:newer>Next</txp:newer>
</p>
</txp:if_article_list>
</div></code>

This is from my archive page:

<code>
<!— center —>
<div id=“content”>
<txp:article sortby=“Title” sortdir=“asc”/>
<txp:article form=“default” />
<txp:if_individual_article>
<p>
<txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
<txp:link_to_next><txp:next_title /></txp:link_to_next>
</p>
</txp:if_individual_article>
<txp:if_article_list>
<p>
<txp:older>Previous</txp:older>
<txp:newer>Next</txp:newer>
</txp:if_article_list>
</p>
</div>
</code>

This is from my default article form:

<code>
<h3><txp:permlink><txp:title /></txp:permlink></h3>
<txp:body />
<txp:comments_invite wraptag=“p” />
<div align=“center”><img src=”<txp:site_url />images/1.gif” style=“height:1px;width:400px” class=“divider” alt=”“ /></div>
</code>

Offline

#2 2006-03-05 12:26:57

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

Re: (Beginner) Display entries in alphabetical order?

Just remove the <txp:article form="default" /> tags on both pages. The first article tag will do what you want. You only need the form attribute if you are using another form than ‘default’.

Offline

#3 2006-03-05 12:28:09

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: (Beginner) Display entries in alphabetical order?

It’s because you’re calling the article tag twice. Just have: <txp:article sortby="Title" sortdir="asc"/> :)

That Els is too quick for me. ;)

Last edited by Mary (2006-03-05 12:28:33)

Offline

#4 2006-03-05 12:39:28

tez
Member
Registered: 2006-02-25
Posts: 22

Re: (Beginner) Display entries in alphabetical order?

You guys are great!

Many thanks

Tez

Offline

Board footer

Powered by FluxBB