Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-22 09:15:50

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Exerpt in side column

Hi,

I write a blog page.
I’d like to have an exerpt on the front page side column.

How do I differentiate between the article and article exerpt?

I’ve been looking for a <txp> command to handle article exerpts but haven’t found it yet.
I guess its there somewhere or there’d be little point in having the exerpt box.

Can anyone speed up my search with a helpful prod in the right direction?

Thanks
Geoff


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#2 2008-04-22 09:19:52

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

Re: Exerpt in side column


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

Offline

#3 2008-04-22 09:30:50

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: Exerpt in side column

Hi I’d found that tag but it has no attributes.

I need to display the exerpt of the most recent entry in section=“Blog”


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#4 2008-04-22 09:38:26

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: Exerpt in side column

<txp:article_custom section=“Blog” exerpted=“y” limit=“1” /><txp:if_excerpt>
<txp:excerpt />
</txp:if_excerpt></txp:article_custom>

EDIT: Not working … it displays the article.
How do I wrap section and limit tags around <txp:exerpt />

Thanks

Last edited by geoff777 (2008-04-22 09:46:04)


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#5 2008-04-22 09:43:32

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

Re: Exerpt in side column

Ah, gotcha, sorry I misunderstood. A quick way round it might be to use article_custom in your side bar:

<txp:article_custom section="blog" form="my_excerpt_form" />

and then put the <txp:excerpt /> tag in my_excerpt_form. You may have to set the blog section to “show on front page” from the Sections tab, I’m not sure (I’ve never really figured it out definitively).

I’m sure someone can post a better solution.

EDIT: You beat me to it :-)

EDIT 2: You shouldn’t need the <txp:if_excerpt> if using excerpted="y"

Last edited by Bloke (2008-04-22 09:45:57)


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

Offline

#6 2008-04-22 09:56:13

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: Exerpt in side column

Thanks Bloke,

Finally got there.

<txp:article_custom section=“Blog” exerpted=“y” limit=“1” form=“exerpt_form” />

Thank you


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#7 2008-04-22 16:37:19

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

Re: Exerpt in side column

Bloke wrote:

You may have to set the blog section to “show on front page” from the Sections tab, I’m not sure (I’ve never really figured it out definitively).

Not in this case. You only need to do that when you use the – context sensitive – <txp:article /> tag :)

Offline

Board footer

Powered by FluxBB