We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Template and Embedded Template Parsing Order Issue

Development and Programming

transparentb's avatar
transparentb
24 posts
14 years ago
transparentb's avatar transparentb

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

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
14 years ago
Sue Crocker's avatar Sue Crocker

Hi, transparentb,

I’m going to move this over to the Development forum for additional community support. We ordinarily don’t assist with programming questions.

       
transparentb's avatar
transparentb
24 posts
14 years ago
transparentb's avatar transparentb

Thanks Sue. I hope to hear from someone about this soon.

       
transparentb's avatar
transparentb
24 posts
14 years ago
transparentb's avatar transparentb

while I would love to know if ExpressionEngine’s parsing order is what is causing my problem when retrieving cookies, I was able to solve this by using query strings and removing the need for these particular cookies.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.