yogthos/Selmer

Parameters in include

Aberta

#90 aberto em 27 de jul. de 2015

 (1 comentário) (0 reação) (0 responsável)Clojure (121 forks)batch import
enhancementhelp wanted

Métricas do repositório

Stars
 (1.042 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Hello, I am trying to use an include tag when passing parameters as follows

{% include "views/pagination.html" with controller="users" %}

While getting the value of the parameter controller works with {{}} syntax, it does not seem to be in the context-map and thus is not usable in custom tags in the partial ("views/pagination.html" in my case).

My current solution is rather ugly

{% with controller=controller|default:"users" %}
  {% include "views/pagination.html" %}
{% endwith %}

so I would like to know if there is a better way to do something like that or will it be very difficult for me to implement it?

Note: This might be related to #78.

Guia do colaborador