Skip to main content
11 of 14
added 1851 characters in body
Matt
  • 51
  • 6

multiple sliders one page - Stash parse order and Playa

Concept is to stash entry_ids of playa entries to pass to jquery-nivoslider call, so that both the slider div and the call will not have identical slider ID's resulting with conflict.

As of now, when using process="end" tag, it doesn't appear to have playa parsing the vars in the proper order.

{preload_replace:my_channel="rehab"} 
{preload_replace:my_playa_channel="rehab_updates"} 
{preload_replace:my_single_entry_template="view"}

{exp:stash:parse process="end"}
    {exp:channel:entries channel="{my_channel}"}
      {exp:playa:parents channel="{my_playa_channel}" status="open" entry_id="{stash:update_ids}"}
  <slider window call>
      {/exp:playa:parents}
    {/exp:channel:entries}
{/exp:stash:parse}


 {exp:channel:entries channel="{my_channel}" url_title="{segment_3}" limit="1" require_entry="yes"}
    {exp:stash:set name="update_ids" parse_tags="yes" trim="yes"}
        0{exp:playa:parents channel="{my_playa_channel}" status="open" limit="10"}|{entry_id}{/exp:playa:parents}
    {/exp:stash:set}
{/exp:channel:entries}



{exp:channel:entries channel="{my_channel}" url_title="{segment_3}" limit="1" dynamic="on"}
<content>
{exp:stash:parse process="end" parse_depth="2"}  {exp:playa:parents channel="{my_playa_channel}" status="open" limit="10" entry_id="{stash:update_ids}"}
{/exp:stash:parse}
<content that gets playa prefixes>
{/exp:playa:parents}
    {/exp:channel:entries}

i'm now trying to stash everything that i will use within entry and playa entries. I've been checking the template output and so far it's only parsing and storing the rehab_list that is within the channel loop, but the rehab_update_list is not being parsed that's within the playa rehab_update loop. After this is resolved, i will attempt to store this in a parsing order in which i will be able to have it efficient and problem free for page lay out.


{exp:stash:set_list 
name="rehab_list" 
parse_tags="yes" 
trim="yes" 
parse_depth="5"
}

   {exp:channel:entries 
   channel="rehab" 
   url_title="{segment_3}" 
   limit="1"
   require_entry="yes"
    }

    {stash:rehab_entry_id}{entry_id}{/stash:rehab_entry_id}
    {stash:rehab_url_title}{url_title}{/stash:rehab_url_title}
    {stash:rehab_title}{title}{/stash:rehab_title}

  
      {exp:stash:set_list:nested 
      name="rehab_update_list" 
      parse_tags="yes" 
       parse_depth="3"
          }    

         {exp:playa:parents 
         channel="rehab_update" 
         status="open" 
         limit="10"
          }
    0{stash:playa_entry}|{entry_id}{/stash:playa_entry}
    {stash:playa_title|{title}{/stash:playa_title}
   
    {image_uploads sort="asc"}{photo_images size="thumbnail"}     
   {stash:playa_entry_img}{photo:url}{/stash:playa_entry_img}
   {stash:playa_entry_img_label}photo_label}{stash:playa_entry_img_label}
        {/photo_images} {/image_uploads}

   {stash:playa_summary_update}{summary_update}{/stash:playa_summary_update}
   {stash:playa_materials_needed}{materials_needed}{/stash:playa_materials_needed}
   {stash:playa_steps_taken}{steps_taken}{/stash:playa_steps_taken}

    {/exp:playa:parents}
   {/exp:stash:set_list:nested}
  {/exp:channel:entries}
  {/exp:stash:set_list}
Matt
  • 51
  • 6