Zotonic
Zotonic
zotonic@conference.zotonic.com
Wednesday, 23 November 2011< ^ >
arjan has set the subject to: Zotonic - the Erlang CMS
Room Configuration

GMT+1
[05:57:12] vio42 leaves the room
[10:05:42] arjan joins the room
[10:36:04] arjan leaves the room
[10:36:49] arjan joins the room
[12:10:08] Yves joins the room
[12:10:32] <Yves> Hi ?
[12:17:51] <arjan> hey
[12:18:04] <arjan> pretty quiet here :)
[12:34:43] <Yves> Halo, arjan. I'm a new developer starting with Zotonic. So 2 questions : 1. I'm using Emacs, what's the best config/tools ? 2.{{ code|append:""|upper }} seems to work but {{ code|upper }} not. I't a bug or a feature ? Zotonic 0.7.1, erlang 14B, Debian Squeeze.
[12:35:52] <arjan> hi, welcome :)
[12:35:55] <arjan> I use emacs as well
[12:37:03] <arjan> for erlang files, I use three things:
1) erlang-mode
2) flymake for on the fly syntax checking
3) zotonic's mod_development will automatically recompile .erl files when you save them
[12:41:40] <arjan> {{ code|upper }} should work
[12:41:52] <arjan> what does {% print code %} give you?
[12:42:02] <arjan> if it is an erlang 'atom', it might not work
[12:44:05] <Yves> sample code (not good but simple ;-) ::
[12:44:09] <Yves> {% block content_lang %}
{% with m.config.i18n.language_list.list as list %}
{% if list %}
<div id="langues" style="font-size:12px"> &middot;
{% for code, lang in list %}
{% if all or lang.is_enabled %}
{# append:"" is used because method code|upper don't works #}
<a id="lang_{{ code }}" href="#">{{ code|append:""|upper }}</a> &middot;
{% endif %}
{% endfor %}
</div>
{% wire id="lang_en" postback={set_language code="en"} delegate="mod_translation" action={redirect location="about-us"} %}
{% wire id="lang_fr" postback={set_language code="fr"} delegate="mod_translation" action={redirect location="about-us"} %}
{% wire id="lang_nl" postback={set_language code="nl"} delegate="mod_translation" action={redirect location="about-us"} %}

{% endif %}
{% endwith %}
{% endblock %}
[12:45:11] <arjan> ok
[12:45:36] <Yves> in this my case, code|upper render the same thing than code, eg en -> en. but en|append:""|upper seems to work ???
[12:46:07] <arjan> you're right, this is a bug
[12:46:31] <Yves> Thanks! I safe my honnor ;-)
[12:46:35] <arjan> upper/lower filters should first convert their argument to a list
[12:48:41] <arjan> by the way, there is a way to use wires in a loop
[12:49:00] <arjan> by using generated id's with variables inside them
[12:49:03] <arjan> like this:
[12:49:16] <arjan> {% for code, lang in list %}
{% if all or lang.is_enabled %}
{# append:"" is used because method code|upper don't works #}
<a id="{{ #lang.code }}" href="#">{{ code|upper }}</a> &middot;
{% wire id=#lang.code postback={set_language code=code} delegate="mod_translation" action={redirect location="about-us"} %}
{% endif %}
{% endfor %}
[12:52:46] <arjan> fixed and pushed.
[12:52:56] <arjan> you might be better off running on the release-0.7.x branch from git
[12:53:26] <arjan> we should get a 0.7.2 release out but we're very busy :-/
[12:53:55] <Yves> Other thing: ACL Simple role module don't work on my install. Access Control - Roles Overview
permits creation of profiles but not editing.
[12:54:38] <Yves> thanks for the code
[12:56:55] <arjan> np
[13:44:29] <Yves> Other question: do you know if there are many opportunities/request with/for Zotonic CMS ?
[14:38:21] Yves leaves the room
[16:16:02] arjan leaves the room
[21:22:44] arjan joins the room
[21:30:56] arjan leaves the room
Powered by ejabberd Powered by Erlang Valid XHTML 1.0 Transitional Valid CSS!