Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2007-12-29 11:00:31

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: A way to remove an image from an excerpt?

iblastoff wrote:

you can’t throw a txp tag within php like that.

Yeah I know, but thought I would try it out to see what the error was ;-)

Offline

#14 2007-12-29 12:15:14

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: A way to remove an image from an excerpt?

I meant to check if we have excerpt, than wrap it with <span>. Something like this:

<txp:if_excerpt>
<span class="noimg"><txp:excerpt /></span>
<txp:else />
<txp:body />
</txp:if_excerpt>

But it’s too common solution – i don’t know the way you use excerpt :)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#15 2007-12-29 12:44:04

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: A way to remove an image from an excerpt?

Perfect! Thanks! I ended up with this in the form:

<h3><txp:permlink><txp:title /></txp:permlink></h3>
<span class="noimg"><txp:excerpt /></span>

And the style sheet:

span.noimg img { 
    display: none; 
}

Offline

Board footer

Powered by FluxBB