Developer forum

Forum » Templates » ParagraphText question

ParagraphText question

Dmitrij Jazel
Reply

Hello DW guys,

I am trying to work with ParagraphText in paragraph template here

And trying using something like this:

    <!--@If Defined(ParagraphText)-->    
    <div class="boxText">
        <!--@ParagraphText-->
    </div>
    <!--@EndIf(ParagraphText)-->

eventually what I did expect was to hide "boxText" class div if paragraph text is empty

But eventually this is the markup I am getting:

    

So apperently paragraph tag is always defined, it uses some kind of A tag, not sure why or how, but it contains paragraph id in the "name" field.

And so my question is what is the correct to do the above? :-)

//Dmitrij



Replies

 
Dmitrij Jazel
Reply

Anyone?

Or that is something that DW not supposed to do?

I actually haven't seen anything like this before.

//Dmitrij

 
Morten Bengtson
Reply
This post has been marked as an answer

Hi Dmitrij,

You can go to Management Center > System > Solution settings > Performance and make sure "Disable paragraph bookmark" is checked. That should make your example work.

 

Votes for this answer: 1
 
Nicolai Høeg Pedersen
Reply

If you are running the newest 8.2.1 release you can also do like this:

 

<!--@ If(ParagraphText.StripHtml()<>'')-->

or

<!--@ If Defined(ParagraphText.StripHtml())-->

 
Dmitrij Jazel
Reply

Hej Nicolai,

version is: Professional - 19.2.9.9

Still thanks for collaboration, I am sure I will use it on new DW version :)

and Mortens solution worked perfectly!

Thanks alot for help guys! :-)

//Dmitrij

 

 

You must be logged in to post in the forum