Developer forum

Forum » Templates » use of If tags

use of If tags


Reply

Hello,

 

I have the idea that I may be able to use the below functionality ..

 

 

<!--@If Defined(Global:Extranet.UserName)-->
You are logged in as:<br />
<strong>
<!--@Global:Extranet.Name-->
</strong>
<!--@EndIf(Global:Extranet.UserName)-->
<!--@If Not Defined(Global:Extranet.UserName)-->
<!--@Include(../Extranet/Login.html)-->
<!--@EndIf(Global:Extranet.UserName)-->

 

NOW !!

 

I want to be able to test if there is something in any given tag ..

is that possible?

 

Eg this:

 

<!--@If Defined(ParagraphImage)-->

 

<img src="<!--@ParagraphImageClean-->" />

 

<!--@EndIf(ParagraphImage)-->

 

This will circumvent the instance where I use the clean image tag i a template,

but there is no image selected --

 

Please feel free to help me out

 

/ ditte, condurra /

signed in as rasmus .. since my password still won't work #!@##

 

 


Replies

 
Reply
rs@condurra.dk wrote:

Hello,

 

I have the idea that I may be able to use the below functionality ..

 

 

<!--@If Defined(Global:Extranet.UserName)-->
You are logged in as:<br />
<strong>
<!--@Global:Extranet.Name-->
</strong>
<!--@EndIf(Global:Extranet.UserName)-->
<!--@If Not Defined(Global:Extranet.UserName)-->
<!--@Include(../Extranet/Login.html)-->
<!--@EndIf(Global:Extranet.UserName)-->

 

NOW !!

 

I want to be able to test if there is something in any given tag ..

is that possible?

 

Eg this:

 

<!--@If Defined(ParagraphImage)-->

 

<img src="<!--@ParagraphImageClean-->" />

 

<!--@EndIf(ParagraphImage)-->

 

This will circumvent the instance where I use the clean image tag i a template,

but there is no image selected --

 

Please feel free to help me out

 

/ ditte, condurra /

signed in as rasmus .. since my password still won't work #!@##

 

 

Hi Ditte,
 

 

I've used them with sucess in the news_v2 module, for example. I believe you can do it with any tag.

 

Regards,

Nuno

 

You must be logged in to post in the forum