0

First of all I will collect all the website categories in a particular category group. Then, for each category group I will generate my Markup that will be fed to Jquery to generate navigational tabs. So far so good.

Then I will fetch (inside the category loop) the channel entries and I would like them to be actually filtered by category_id.

I get no output with this code:

<!-- HERE I AM COLLECTING THE WEBSITE CATEGORIES -->

    {exp:stash:set_list name="categories" scope="site" parse_tags="yes"}
        {exp:channel:categories category_group="1"}
        {stash:cat_name}{category_url_title}{/stash:cat_name}
        {stash:cat_id}{category_id}{/stash:cat_id}
        {/exp:channel:categories}
    {/exp:stash:set_list}

<!-- HERE I AM COLLECTING THE CHANNEL ENTRIES -->    
    {exp:stash:set_list name="where" parse_tags="yes" process="end" parse_depth="3"}
        {exp:channel:entries channel="dove_siamo" dynamic="no"}
        {stash:item_entry_id}{entry_id}{/stash:item_entry_id}
                    {categories}
                    {stash:this_category}{category_id}{/stash:this_category}
                    {/categories}
            {exp:stash:set_list:nested name="address" context="{entry_id}" parse_tags="yes" }
                    {address}
                        {stash:via}{via}{/stash:via}
                        {stash:cap}{cap}{/stash:cap}
                        {stash:citta}{citta}{/stash:citta}
                        {stash:ospedale}{ospedale}{/stash:ospedale}
                        {stash:altro}{altro}{/stash:altro}
                        {stash:centralino}{centralino}{/stash:centralino}
                    {/address}
            {/exp:stash:set_list:nested}
        {/exp:channel:entries}
    {/exp:stash:set_list} 
    {exp:stash:get_list name="categories"} 
               <div id="{cat_name}">
                    <section class="quick-info">
                        <div class="vcard">
                            <h4>Dove siamo</h4>
                            <p>{cat_id}</p>
                            {exp:stash:get_list:nested name="where" match="#^{this_category}$#" against="cat_id"}
                            <p>{this_category}</p>
                                {exp:stash:get_list:nested_1 name="address" context="{item_entry_id}"}
                                <span class="adr">{via} {cap} - {citta}</span></br>
                                <span class="adr">{ospedale}</span></br>
                                <span class="adr">{altro}</span>
                                {/exp:stash:get_list:nested_1}
                            {/exp:stash:get_list:nested}
                        </div>
                    </section>
                </div>
    {/exp:stash:get_list}
2
  • Is anything output for the "categories" list at all (like the heading "Dove siam"), or is it only the interior nested list "where" that's not outputting anything? Feb 5, 2015 at 13:40
  • With the above match / against I get nothing outputted by "Dove_siamo". If I remove the parameters I get all the results.
    – Milksamsa
    Feb 5, 2015 at 15:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.