Set State by template

Put your questions here on how to do things in ProtoShare.
scott_77
Posts: 3
Joined: Tue Sep 15, 2015 12:36 pm

Set State by template

Postby scott_77 » Mon Oct 19, 2015 9:58 am

If I have 3 templates: t1, t2, and t3 .... And I have a state called TemplateState with 3 values that represent the 3 templates, for example a, b, and c

Is there a way when I navigate to a page using t1, my TemplateState could be switched to 'a'.
And if I go to a page using t3 it changes my TemplateState to 'c'. And than then the same type of thing with t2 and TemplateState switches to 'b'.

I am assuming I have to use the advanced HTML feature, so how might I do this in HTML?

Nick Jennings
Posts: 165
Joined: Mon May 14, 2012 12:06 pm

Re: Set State by template

Postby Nick Jennings » Mon Oct 19, 2015 2:13 pm

Hi Scott,

You most likely do not need to deal with an advanced HTML component. Components can be set to have both stateful actions and linking capabilities at the same time. Making the state global will also let you access it from any design that uses states. For example, you can set all the linking components in your t3 template to change the global state value to c. This will let it automatically change the state value before it loads the new page. It works great in navigation systems like mega menus that use separate components for each link.

Using an automatic navigation for your links is a bit different since you can only set an On Click for the entire navigation component. You can create hot spots over your navigation that act like an invisible hyperlink with the Link Mode (looks like a chain in the toolbar next to annotations). You can than configure the hot spot to change the state and link to the respective page you want. The only issue with this is that there might end up being a lot of hot spots for your template if your navigation is large.

Hopefully this helps. If you have a different setup, just let us know and we can see if there are any additional ways to achieve this.


Return to “How Do I...”

Who is online

Users browsing this forum: No registered users and 1 guest

cron