Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-09-16 14:33:48

wspence
Member
Registered: 2006-09-03
Posts: 84

Is there any way to place...

a div in the middle of every article automatically? This would be used for an advertisement block like you see on many major websites. Thanks in advance!

Offline

#2 2007-09-16 14:52:50

wspence
Member
Registered: 2006-09-03
Posts: 84

Re: Is there any way to place...

I see that you can use page limits and such when listing articles, but I don’t see anything about limiting the article body. For example, have 3 paragraphs, then an ad block, etc.

Last edited by wspence (2007-09-16 14:59:51)

Offline

#3 2007-09-17 10:48:51

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

Re: Is there any way to place...

May be with rss_autoexcerpt and an output_form holding your add inside the article body.

E.g.: Place your output_form after the two first paragraphs of each article, and then use a limit of three paragraphs in rss_outoexcerpt.

regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#4 2007-09-17 17:03:20

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Is there any way to place...

As marios said, by using rss_auto_excerpt :

<txp:rss_auto_excerpt paragraphs="1" excerptwraptag="" showlinkwithbody="0" showlinkwithexcerpt="0" overrideexcerpt="1" excerpt="body" />
<div class="adblock"> <!-- Your ad here --> </div>
<txp:rss_auto_excerpt skipparagraphs="1" paragraphs="9999" excerptwraptag="" showlinkwithbody="0" showlinkwithexcerpt="0" overrideexcerpt="1" excerpt="body" />

Replace with it your <txp:body />-tag in the article form.

Cheers!

Last edited by Gocom (2007-09-17 17:04:37)

Offline

Board footer

Powered by FluxBB