expressionengine - wrong content in pagination links /PX/PY with conditional channel:entries tags, (structure + freebie plugins) -
hey expressionengineers,
i using following code test cannel:entries tag render depending on value of cerstain freebie variables (see code snippet below).
the problem: although renders 1 set of links (which correct) pagination links content seems affected due number of {paginate} tags in template when example last condition hit. have pagination links in format ..../px/px/py/.... , not /px
<div id="content"> {exp:channel:entries channel="medecine_chinoise"} <h1>{title}</h1> {/exp:channel:entries} {if "{freebie_3}" == "categorie"} {exp:channel:entries channel="medecine_chinoise_articles" category="{freebie_4}" dynamic="no" limit="6" paginate="bottom" parse="inward"} ... {paginate} {if "{total_pages}" != 1} <hr /> {pagination_links} {/if} {/paginate} {/exp:channel:entries} {/if} {if "{freebie_4}" == "categorie"} {exp:channel:entries channel="medecine_chinoise_articles" category="{freebie_5}" dynamic="no" limit="6" paginate="bottom" parse="inward"} ... {paginate} {if "{total_pages}" != 1} <hr /> {pagination_links} {/if} {/paginate} {/exp:channel:entries} {/if} {if "{freebie_3}" != "categorie" && "{freebie_4}" != "categorie"} {exp:channel:entries channel="medecine_chinoise_articles" dynamic="no" limit="6" paginate="bottom" parse="inward"} ... {paginate} {if "{total_pages}" != 1} <hr /> {pagination_links} {/if} {/paginate} {/exp:channel:entries} {/if} </div>
i able track down problem of freebie plugin developer doug , structure`s developer travis. there seems real reason why 1 thing solved issue embedding channel entries tag , corresponding pagination inside template , embed this:
{if "{freebie_3}" == "categorie"} {embed="medecine_chinoise/articles_template" cat="{freebie_4}" } {/if} {if "{freebie_4}" == "categorie"} {embed="medecine_chinoise/articles_template" cat="{freebie_5}" } {/if} {if "{freebie_3}" != "categorie" && "{freebie_4}" != "categorie"} {embed="medecine_chinoise/articles_template" cat="" } {/if}
the 2 thread solutions can found at:
http://devot-ee.com/add-ons/support/freebie/viewthread/2028/
Comments
Post a Comment