Added a macro to simplify inserting site urls

This commit is contained in:
str4d
2012-09-14 02:03:44 +00:00
parent 8e75eeb712
commit 2d0a6c3313
15 changed files with 95 additions and 98 deletions

View File

@@ -0,0 +1,5 @@
{%- macro site_url(path=None) -%}
{%- if path -%}{{ url_for('site_show', lang=g.lang, page=path) }}
{%- else -%}{{ url_for('site_show', lang=g.lang) }}
{%- endif -%}
{%- endmacro -%}