Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-05-05 12:31:00

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Excerpt styling issue...must be missing the obvious ?

So I want to post the excerpt and body together, but I want to style the excerpt much differently, and I also want to do it clean and semantic-like (i.e., I don’t want to wrap span tags around Txp’s added p tags).

So, I thought of two other ways to go about it, but neither seems to be cutting the mustard.

Ideal method 1:

I would like to use Inspired’s ied_doArticle plugin (one of my favorites) because I already have that plugin installed and use it in other ways. This plugin works by identifying an article component by the article’s “id”, for example <txp:ied_doArticle id="2" field="excerpt" textile="y" />. In most cases this is fine and dandy, but in this instance it doesn’t work because I need the “id” to process on the fly. What would work beautifully is if I could use id="<txp:article_id />", giving me…

<p class="xerpt"><txp:ied_doArticle id="<txp:article_id />" field="excerpt" textile="y" /></p>

but sadly that doesn’t work. I haven’t been able to reach Yura (Inspired) about any possible mods.

Method 2:

The other approach, which I quick-stepped to try was the etz_striptags plugin. This does exactly what it’s supposed to do, leaving me with the ability to add my own p element with an included class attribute (hence the ability to custom style the excerpt)…

<p class="xerpt"><txp:etz_striptags><txp:excerpt /></txp:etz_striptags></p>

Unfortunately, this renders both Textile and regular HTML syntax useless within the striptag tags, so while I can do global styling on the excerpt, I’m SOL for anything inline (abbr, em, strong, etc.).

Anyone have a bead on something I’m missing, another approach or a tweak to these plugins?

Last edited by Destry (2007-05-05 13:09:38)

Offline

#2 2007-05-05 13:57:12

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: Excerpt styling issue...must be missing the obvious ?

Oh blimey, so it’s this easy? Didn’t see that the first round of searching.

EDIT: Yep, it’s that easy, and it’s on an article-by-article basis. It’s funny how there’s just things that look you in the eye on a daily basis and you still see right through them.

Note to self: Pull your head out!

Last edited by Destry (2007-05-05 14:13:50)

Offline

Board footer

Powered by FluxBB