Tuesday, 5 February 2013< ^ >
arjan has set the subject to: Zotonic - the Erlang Content Management Framework
Room Configuration

[00:50:48] maas.maarten.zeeman leaves the room
[05:47:32] Jeff Bell leaves the room
[05:47:47] Jeff Bell joins the room
[05:48:02] Jeff Bell leaves the room
[08:58:09] maas.maarten.zeeman joins the room
[09:08:03] Andreas Stenius joins the room
[09:48:46] <maas.maarten.zeeman> Yesterday evening I found out that I actually don't have to sprinkle stat collection calls all over webzmachine.
Zotonic can do it on its own. In the z_sites_dispatcher, the only extra thing I need to add is to collect the stat information via the performance logger. That can be done in its application env setting.
[09:50:54] <maas.maarten.zeeman> It is nice to be able to keep it inside the zotonic app.
[10:07:04] <maas.maarten.zeeman> haha funny.. the with tag does not show in searches... because it is a stop word?
[10:12:13] <maas.maarten.zeeman> Hmm I want to store a calculated url from the url tag in a with tag... It would be better if that value was retrieved via a model.
[10:13:18] <maas.maarten.zeeman> nah
[10:13:43] <maas.maarten.zeeman> then it is hard to pass proplist options.
[10:15:34] <maas.maarten.zeeman> Hmm, maybe not...
[10:16:49] <maas.maarten.zeeman> m.dispatch[{something id=id spam="eggs"}]
[11:15:12] <Andreas Stenius> I feel I'm not quite following your train of thought on this one...
[11:15:54] <maas.maarten.zeeman> Well I wanted to place {% url ... %} in a {% with ... %} so I could use it in another location too.
[11:16:14] <maas.maarten.zeeman> Not possible I think
[11:16:57] <Andreas Stenius> Ah, I've not completely grasped the with tag yet... :p
[11:17:16] <maas.maarten.zeeman> Ow its easy.
[11:17:53] <maas.maarten.zeeman> {% with m.some_model[...] as xyz %}
[11:18:11] <maas.maarten.zeeman> Then you can use {{ xyz }} inside the with block
[11:19:31] <Andreas Stenius> uhm, doh. yeah, I confused it with some other construct Marc added some time ago, was it not also called with?... something like: {% with foo="bar" %} ... i.e. not using the as keyword, but a = assignment...
[11:20:05] <maas.maarten.zeeman> ow, donno about that one.
[11:20:29] <Andreas Stenius> I'll see what I can dig out...
[11:20:41] <maas.maarten.zeeman> url is not really a tag maybe.
[11:22:08] <maas.maarten.zeeman> aha... in django you can do:
[11:23:06] <maas.maarten.zeeman> {% url some_view a=1 b=2 as the_url %} makes sense, but not in erlydtml style as there is no place to bind the_url to I think.
[11:26:46] <Andreas Stenius> this commit: https://github.com/zotonic/zotonic/commit/cbcc8b00c0307cd8a0e52da586ebee946a8c22e7
[11:28:17] <Andreas Stenius> "Make the {{ ... with a=b }} arguments available as z_context:get(extra_args, Context). Use this to pass extra (optional) arguments to the {{ id.page_url }}."
Sounds like it could be useful in your case, perhaps?
[11:28:20] <maas.maarten.zeeman> wow
[11:28:44] <Andreas Stenius> I've asked Marc to document it :p
[11:29:32] <maas.maarten.zeeman> I don't get it from the explanation. Maybe the source...
[11:29:52] <Andreas Stenius> for me, reading commit messages and asking questions keep me posted, but I have to dig up information whenever I need it again... don't know how I can remeber it though.. ;)
[11:30:12] <Andreas Stenius> I asked for clarification on the mailing list, and I almost understood it then...
[11:30:21] <Andreas Stenius> see if I can find the thread...
[11:30:25] <maas.maarten.zeeman> Ow... nasty ZpContext :-)
[11:30:35] <maas.maarten.zeeman> magic.
[11:32:00] <Andreas Stenius> did you read the comments on github?
[11:32:08] <maas.maarten.zeeman> So during the retrieving of the variables you can add extra argument... aha I see.
[11:32:18] <maas.maarten.zeeman> Was eyeballing the code
[11:32:39] <maas.maarten.zeeman> https://github.com/zotonic/zotonic/commit/cbcc8b00c0307cd8a0e52da586ebee946a8c22e7#L0R567
[11:32:54] <maas.maarten.zeeman> Available in all templates :-)
[11:33:39] <Andreas Stenius> ZpContext? I think I'd like to see the source of a compiled template... :p
[11:34:47] <maas.maarten.zeeman> Have to go. Speak to you later.
[11:39:36] <Andreas Stenius> See you :)
[12:02:55] <maas.maarten.zeeman> Duh, and id.page_url is short for m.rsc[id].page_url. Didn't know that either.
[12:03:03] <maas.maarten.zeeman> :-p
[12:05:01] <maas.maarten.zeeman> btw, also cool for search model
[12:06:08] <maas.maarten.zeeman> m.search['latest'] with cat="text" pagelength=10 but that needs an extension in the for syntax too :-p
[13:26:44] <Andreas Stenius> maas.maarten.zeeman: did you see the note on this page: http://zotonic.com/docs/0.9/manuals/templates/models.html ;)
[13:27:41] <maas.maarten.zeeman> No, never... haha.
[13:28:34] <Andreas Stenius> :p
[13:29:14] <maas.maarten.zeeman> At first glance the with looked like a special kind of filter.
[14:27:07] Jeff Bell joins the room
[15:20:40] maas.maarten.zeeman leaves the room
[15:43:05] maas.maarten.zeeman joins the room
[15:59:32] maas.maarten.zeeman leaves the room
[16:34:14] maas.maarten.zeeman joins the room
[20:05:53] maas.maarten.zeeman leaves the room
[20:31:14] simon.smithies joins the room
[22:19:08] simon.smithies leaves the room
[22:38:27] Andreas Stenius leaves the room
Powered by ejabberd Powered by Erlang Valid XHTML 1.0 Transitional Valid CSS!