Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-08-24 06:13:26

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,136
Website Mastodon

I want to show two specific articles on a page/section

How do i have two articles display on one Page / Section?

I want to have the user be able to edit a couple of specific entries that appear on the About Page.,

I am assuming it is used with the ID function but i am unable to find an example of how to construct the tag.

Last edited by bici (2011-08-24 14:50:07)


…. texted postive

Offline

#2 2011-08-24 08:20:08

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: I want to show two specific articles on a page/section

I’m not sure I understood. What you want is display two article in the About page?
If this is your case you can do that with article_custom using the id attribute.

Is this your case?

Last edited by wornout (2011-08-24 08:20:22)

Offline

#3 2011-08-24 15:02:42

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,136
Website Mastodon

Re: I want to show two specific articles on a page/section

wornout wrote:

I’m not sure I understood. What you want is display two article in the About page?
If this is your case you can do that with article_custom using the id attribute.
Is this your case?

Yes, but on that page there is no example of how to output an article entry by id #.

Assuming i have an article id 73 and an article id 81, what would the tag structure be?

can one use entry_id=“73” e.g.: <txp:article entry_id=“73” /> ??


…. texted postive

Offline

#4 2011-08-24 15:08:18

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: I want to show two specific articles on a page/section

You can use this:

<txp:article_custom id="73,81" />

The order of id isn’t the final sort criteria.

Offline

#5 2011-08-24 15:34:15

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,136
Website Mastodon

Re: I want to show two specific articles on a page/section

wornout wrote:

You can use this:
<txp:article_custom id="73,81" />
The order of id isn’t the final sort criteria.

Millie grazie for your quick reply.

As I want one article to appear in one area and another on another adjacent area I will use that tag twice in my Page and display the entry by id .

PS I have always found the lack of concrete examples on the tag Reference page to be frustrating.


…. texted postive

Offline

#6 2011-08-24 15:46:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,947
Website GitHub

Re: I want to show two specific articles on a page/section

bici wrote:

I have always found the lack of concrete examples on the tag Reference page to be frustrating.

You can always request a wiki account and add better examples yourself :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#7 2011-08-24 16:08:04

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,136
Website Mastodon

Re: I want to show two specific articles on a page/section

Bloke wrote:

You can always request a wiki account and add better examples yourself :-)

done ;)

of course i need to know how to add the examples. In this case credit is due to Edoard

EDIT: Sorry, I killed your post because I hit ‘Edit’ instead of ‘Quote’. Bah, fat mouse. I’ve put it back to (almost) how it was.

Last edited by Bloke (2011-08-24 16:25:53)


…. texted postive

Offline

#8 2011-08-24 16:09:11

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: I want to show two specific articles on a page/section

I added a new example using wornout’s code.

Offline

#9 2011-08-24 16:24:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,947
Website GitHub

Re: I want to show two specific articles on a page/section

Bloke wrote:

done ;)

Ummm, that’s the <txp:article_id /> page, not <txp:article_custom />! Michael’s added it on the latter page.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#10 2011-08-25 03:04:19

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,136
Website Mastodon

Re: I want to show two specific articles on a page/section

Bloke wrote:

Bloke wrote:

done ;)

Ummm, that’s the <txp:article_id /> page, not <txp:article_custom />! Michael’s added it on the latter page.

my bad. it should be removed if not i will


…. texted postive

Offline

Board footer

Powered by FluxBB