Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-31 03:35:13

Josefin
Member
Registered: 2008-01-30
Posts: 18

How do I make the excerpt in an article appear in the right column

I would like to display the excerpts of each article in a right column of my site.
I created a form called static_right with:

<div id=“rightcolumn”>
<txp:excerpt />
</div>

and in the page in pages:

<div id=“right_column”><table width=“190” border=“0” cellspacing=“0” cellpadding=“0”> <tr> <td><txp:article form“static_right” /></td> </tr>
</table>
</div>

But all I get is the same text as in the body of the article.

(but yet also the bodytext in the left column as it is supposed to after entering this code:
<div id=“leftcolumn”> <table width=“550” border=“0” cellspacing=“0” cellpadding=“0”> <tr> <td><txp:article form“static_text” /></td> </tr>
</table>
</div>
)

Help??

Offline

#2 2008-01-31 06:08:32

accarter
Member
From: Los Angeles
Registered: 2007-08-31
Posts: 31
Website

Re: How do I make the excerpt in an article appear in the right column

the call should read <txp:article form=“static_right” /> instead of <txp:article form“static_right” />

also, i’m pretty sure all you need in the article form is <txp:excerpt/>

best,
a

Offline

#3 2008-01-31 06:29:04

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: How do I make the excerpt in an article appear in the right column

To display a column with the last 5 article excerpts from all sections, you do something like this:

<div id=“right_column”><table width=“190” border=“0” cellspacing=“0” cellpadding=“0”>  <txp:article_custom form“static_right” limit="5" />
</table>
</div>

And the form static right

<tr><td><txp:excerpt /></td></tr>

Else your table code also gets mixed up.

regards


⌃ ⇧ < ⌃ ⇧ >

Offline

#4 2008-01-31 12:22:14

Josefin
Member
Registered: 2008-01-30
Posts: 18

Re: How do I make the excerpt in an article appear in the right column

Nope! None of the above worked. The = after article form messed it up pretty bad.

I removed the <div> tags from the forms though.

But the issue persist:

This is my code in the page “static_page”:

<div id=“leftcolumn”> <table width=“550” border=“0” cellspacing=“0” cellpadding=“0”> <tr> <td><txp:article form“static_text” /></td> </tr>
</table>
</div>

<div id=“right_column”><table width=“190” border=“0” cellspacing=“0” cellpadding=“0”> <tr> <td><txp:article form“static_right” /></td> </tr>
</table>
</div>

The static_text form contains: <txp:body />
The static_right form contains: <txp:excerpt />

Still… Both left and right column displays the bodytext on the frontend. !!!

???

Offline

#5 2008-01-31 12:29:51

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: How do I make the excerpt in an article appear in the right column

<txp:article form“static_text” /> makes no sense. you need the equal signs. and if you’re copying and pasting directly from this forum, replace all of those pretty curly textile quotes with normal ones.

Offline

#6 2008-01-31 12:50:13

Josefin
Member
Registered: 2008-01-30
Posts: 18

Re: How do I make the excerpt in an article appear in the right column

That did it! Thanks!

And accarter as well. You were right. I was wrong. ;-)

Offline

Board footer

Powered by FluxBB