Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-19 01:18:12

theinterned
New Member
From: Montreal, Canada
Registered: 2007-08-13
Posts: 9
Website

hide title if no title present

hi,

In my default form, I have the following markup for the article title:

<txp:permlink><h2><txp:title /></h2></txp:permlink>

I have done this because I need the entire line to be removed from output if there is no title, however the nesting of a block element inside an inline one causes validation issues.

Is there any way I can have markup like:

<h2><txp:permlink><txp:title /></txp:permlink></h2>

and still have the h2 removed from the document if there is no title for an article? I tried using a “wraptag” on the permalink, but this had no effect.

Thanks for the help!

n

Offline

#2 2007-08-19 01:58:26

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

Re: hide title if no title present

Try a plugin: rah_if_title

Cheers!

Offline

#3 2007-08-19 10:02:36

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: hide title if no title present

…or chh_if_data

Offline

#4 2007-08-20 00:59:53

theinterned
New Member
From: Montreal, Canada
Registered: 2007-08-13
Posts: 9
Website

Re: hide title if no title present

thank you both, I ended up gong with chh_if_data because it is more versatile!

Offline

Board footer

Powered by FluxBB