TinyButStrong - the PHP Template Engine
Categories > TinyButStrong general >

Block with HREF

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: Figo
Date: 2013-06-04
Time: 18:08

Block with HREF

Hi,

Consider this template :
<div>[onshow.tbsMessage:strconv=no]</div>[onshow;block=_;when [var.tbsMessage]!='']
<div>[onshow.tbsMessage:strconv=no]</div>[onshow;block=_;when [var.tbsMessage]='']

It's working with :
$tbsMessage = 'Click me';

But nothing is displayed when :
$tbsMessage = '<a href="test.html">Click me</a>'

I've tried for hours, what's is the solution ?

Thanks...
By: Skrol29
Date: 2013-06-05
Time: 23:15

Re: Block with HREF

It may be because of double quotes.
Try be replacing [var.tbsMessage] with '[var.tbsMessage]' in the snippet.

Byt I suggest you should use parameter magnet:
<div>[onshow.tbsMessage;strconv=no;magnet=div]</div>
or
<div>[onshow.tbsMessage;strconv=no;magnet=_]</div>