Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Extra properties and not deleting <a> tags

I use Extra1 and Extra2 to only appear if they're populated.

{$ if nonblank .extra1 $}
    <div class="boxed">
    {$ .extra1 $}
    </div>        
{$ endif $}
<p>
{$ if nonblank .extra2 $}
    <div class="boxed">
    {$ .extra2 $}
    </div>        
{$ endif $}

The "boxed" class puts a dashed border around its use. An example can be seen on www.liddellgrainger.org.uk/ian/AboutIan.html - Extra1 and Extra2 appear on the lefthand side (Outside the house of commons image and an empty box.

But why the empty box? If you view source, you can see an A href tag but no description inside. This is because I inserted a link, but then I deleted the link and the box appears empty. Publish though and the link is still there (just not the description inside the a tags). I found if I insert some normal text into Extra2, publish, then delete Extra2 content, the a tag hangover code has been removed, and my if nonblank Extra2 code works.

Hope that makes sense.

Dan
Tuesday, September 09, 2003

You can empty the extra fields completely by selecting all ( ctrl + A) and then Delete.

Jorgen Brenting
Tuesday, September 09, 2003

Ctrl + A works, but only if you've not already deleted the content (and the hidden <a> tages are there).

Dan
Tuesday, September 09, 2003

This has happened to me recently. The field can look empty but it's not. You have to type or past something in before you Ctrl-A and delete.  I've gotten into the habit of doing that if I have any doubt.

tk
Tuesday, September 09, 2003

*  Recent Topics

*  Fog Creek Home