Conditional Tags

View: New views
2 Messages — Rating Filter:   Alert me  

Conditional Tags

by Rahul-36 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Is there anything like conditional tags in rife life <c:if>? I was
looking to the block tag.... is that the way to do this in rife?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "rife-users" group.
To post to this group, send email to rife-users@...
To unsubscribe from this group, send email to rife-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Conditional Tags

by Coat :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Typically you handle conditional logic where it belongs, in your code,
and define what the different conditions should look like in HTML
using block tags, for example (kinda contrived), in an Element:

if (order.isDeclined()) {
   template.setBlock("status", "declined");
}

And in your template:

<r:v name="status"></r:v>
<r:b name="declined">
  <div>This order is declined</div>
</r:b>

Take a look at http://rifers.org/wiki/display/RIFE/GuideTemplates for
a better example and reasoning, and also the source code to some of
the example apps help out as well.

It takes a little bit to get used to if you are coming from templating
systems that include scripting languages, but I like it.  If you
really need conditional logic in your templates, there's always
Blockvalue scripting: http://rifers.org/wiki/display/RIFE/Blockvalue+scripting+support
but I've never needed to use that beyond the ROLEUSER specialized
script tag though.

Kent

On Apr 27, 2:03 am, Rahul <maverick.rah...@...> wrote:
> Is there anything like conditional tags in rife life <c:if>? I was
> looking to the block tag.... is that the way to do this in rife?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "rife-users" group.
To post to this group, send email to rife-users@...
To unsubscribe from this group, send email to rife-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---

 
 
 
Google
rifers.org web