Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2011-11-17 13:47:53

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Display 'article x of y' on individual article pages

Jonathan, I doubt that the TXP community drools over a current-page-number-on-individual-article-pages tip, but this topic assembles some interesting techniques. I’ll see if that makes for a readable tip. Give me some time.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#14 2011-11-17 13:49:30

davidpmccormick
New Member
Registered: 2011-11-15
Posts: 9

Re: Display 'article x of y' on individual article pages

Uli, I drooled.

Well, almost.

Thanks again.

Offline

#15 2011-11-17 14:09:38

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Display 'article x of y' on individual article pages

You’re welcome, David. Had my fun with this one.
Would you be so kind and post the final, working, version, so people can copy reliable code and not collect snippets from here and there. (I’m thinking of linking back here from TXP Tips.) TIA.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#16 2011-11-22 14:12:15

davidpmccormick
New Member
Registered: 2011-11-15
Posts: 9

Re: Display 'article x of y' on individual article pages

Sure, Uli; I ended up using it pretty much exactly as you had it.

Top of the page:

<txp:article_custom section="your-section" sort="posted asc" limit="9999">
	<txp:variable name='art<txp:article_id />' value='<txp:rvm_counter name="art_num" />' />
</txp:article_custom>

And with the article:

<txp:article section="your-section" sort="posted asc" limit="9999">
	<txp:title />
	<txp:body />
	Article <txp:variable name='art<txp:article_id />' /> of <txp:mdn_count section="your-section" />		
</txp:article>

Offline

Board footer

Powered by FluxBB