Anyway, I thound that's not possible, so I will need to create
specific custom tag for this.

On Oct 3, 2:07 pm, Andrew <andriu...@gmail.com> wrote:
> Hello,
>
> is there any way to use custom template tag inside {if} or ifequal
> tag?
>
> I have custom tag "getpreference" which accepts one parameter and
> returns string value or empty "" string.
> I want to check if value is not empty inside {if} or maybe {ifequal}
> tag, how do I do that?
>
> {% if getpreference "left_position" %}
>   <div class="left">
> {% else %}
>   <div class="right">
> {% endif %}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to