Page 1 of 1

Updating pages created from a template

Posted: Thu Jan 12, 2017 5:52 pm
by Terry Gilliver

I have a menu in a list component on a slide-out panel that is on a template which I have used to create many pages. My client wants to re-order that menu. I f I do this on the template, it only works for newly created pages.

Is there a way I can update these pages without editing each one individually?

(using jquery mobile)


Updating pages created from a template

Posted: Thu Jan 12, 2017 7:29 pm
by Serhii Kulibaba

Hello Terry,

It is impossible to do.
As a workaround you can save a list of menu items to the Storage variable and use that variable in the mapping to the menu on the page event for each page. In that case you will generate a menu automatically with any order you need.


Updating pages created from a template

Posted: Fri Jan 13, 2017 11:18 am
by Terry Gilliver

That sounds feasible, can you give a short example of this?


Updating pages created from a template

Posted: Fri Jan 13, 2017 12:07 pm
by Terry Gilliver

Looking at the mappings to a list control, I see, Text, Visible, Image, Counter value, Counter Visible.

How would I map its click value?


Updating pages created from a template

Posted: Fri Jan 13, 2017 7:59 pm
by Serhii Kulibaba

Please set the page name into the value of the attribute "data-page" on the mapping $-list item:
pre$(element).attr("data-page", value);/pre and read that attribute on the click event:preApperyio.navigateTo($(this).attr("data-page"));/pre