AposSingleton and widget

18 views
Skip to first unread message

Paul Lam

unread,
Jun 22, 2015, 3:34:20 PM6/22/15
to apostr...@googlegroups.com
I run into this problem, most likely because I don't know how widget work exactly.
We have an contact us widget on contact us page,  it is in a custom page  contactus.html via "{{ aposSingleton(page, 'locations', 'map', { location : page.location, currentConditions : page.currentConditions, miniWidget: false }) }}"


now on home page, we need to have smaller contact us widget, so we want to resue most of the stuff from the existing contact-us widget, the only different is we pass in miniWidget: true

we put follow code to "home.html":
{{ aposSingleton(page, 'locations', 'map', { location : page.location, currentConditions : page.currentConditions, miniWidget: true }) }}


However seems the widget content doesn't render at all, also no error. Looking at HTML source, seems a DIV with class "apos-singleton" is rendered, but the data-slug is different on homepage compare to the one on contact-us page. on home page data-slug="/:locations", on contact-us page, data-slug="/contact-us:locations".

is that the cause? how can we fix this issue so that we can use same widget on homepage & contactus page?
Thanks for any help.
Reply all
Reply to author
Forward
0 new messages