Hello all. I have a questioin about the render order of templates and embedded templates that call a plugin. The plugin works with form data from using the get method to retrieve values. Those values are then stored in cookies and then called later using the cookie plus plugin.
Here is the problem I am having.
When the submit button is clicked, the filter plugin unsets and resets cookie values in the constructor. The way the plugins are called are like so…
There is an embedded template that looks like this:
{embed="videos/videos_listing" entry_ids="{exp:filter_categories:filter}"}Then in the template videos/videos_listing, the top has select boxes that call cookie_plus to retrieve values set in the filter_categories constructor. These values are used to select the proper option in the select box after a get method or after a pagination link is clicked. The {embed:entry_ids} is called further down in the template.
The way I thought this would work is that by clicking submit, the action method calls the embeds/filter_categories template (this should invoke the constructor for filter_categories) and then everything would be set for cookie_plus to retrieve the correct cookie values.
What appears to be happening in reality is that the cookie_plus is getting values from the preivous submit and the filter_categories constructor isn’t being invoked until {embed:entry_ids} is called later.
Does that make sense? Thanks for any advice can you give me on this.
Moved to Development and Programming by Moderator
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.