You'd do this with ruby.

- @my_var = "movie"
- if @my_var == "movie"
   %movie
- elsif @my_var == "place"
   %place

-Lorin

On Jul 16, 2009, at 5:27 AM, Pierre Valade wrote:

>
> Hello,
>
> I would like to use HAML to generate dynamic tags.
> How can you use variables in tag % definition ?
>
> For example, %my_var could be evaluated as %movie or %place if my_var
> is a string with either 'movie' or 'place'
>
> Any way to do it using HAML ?
>
> Thanks!
>
> Pierre
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to