Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
need conditional maybe
Hi,
I am displaying a list of recent blog entries along the right column of a site.
The list just displays the article’s title under the articles thumbnail image which has padding and border styles applied to it. Because firefox was collapsing the border around the thumbnail I had to declare a height for it in css.
After I set it up I realized that the client probably will make some posts without images. But if there is no article image the border still appears around the specified height.
I’m wondering what’s the best way to display the posts without images. I was going to use if category but there are already too many article categories and the client is getting confused.
Thanks
its a bad hen that wont scratch itself.
photogallery
Offline
#2 2010-01-22 11:43:08
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: need conditional maybe
You probably want <txp:if_article_image>.
Offline
Re: need conditional maybe
hi Els,
Yes that’s what I need. I can’t get it to work in my article list form though.
<txp:if_article_image>
<txp:permlink><span ><txp:article_image thumbnail="1" /></span> </txp:permlink>
</txp:if_article_image>
<h2 ><txp:permlink><txp:title /></txp:permlink></h2>
thanks
Last edited by kvnmcwebn (2010-01-22 12:22:22)
its a bad hen that wont scratch itself.
photogallery
Offline
#4 2010-01-22 17:56:50
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: need conditional maybe
I see no reason why that code wouldn’t work… Does the tag trace tell you something, or can you post it here?
Offline
Re: need conditional maybe
Stupid question maybe, but you are using v4.2 aren’t you?
Offline
Pages: 1