I saw the documentation, I can not repeat the work.

z_mqtt:publish(<<"~pagesession/ticket/t">>,[],Context).
....
javascript code
{% javascript %}
pubzub:subscribe("~pagesession/ticket/#",function(topic,msg) {console.log(
msg)});
{%endjavascript%}

It does not work for me

четверг, 13 октября 2016 г., 15:36:28 UTC+9 пользователь M-MZ написал:
>
> Here you subscribe to a local page topic. The handler will be called when 
> a message matching topic is published. This is done via:
>
>      pubzub.publish("~pagesession/foo/bar", "hello world");
>
> You can also subscribe and publish to side wide topics. See: 
> http://docs.zotonic.com/en/latest/ref/modules/mod_mqtt.html
>
> An example of its usage can be found here:
>
>
> https://github.com/zotonic/zotonic/blob/master/modules/mod_admin_statistics/templates/admin_statistics.tpl#L77
>
> This subscribes the page to server statistic publishes, and displays them.
>
> Regards,
>
> Maas
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to