Variable needed after {include}
Posted: Fri Aug 13, 2010 6:00 pm
A template's index.tpl uses included templates to render portions of the page like this:
Those included files fetch entries for a particular category using a specified entries template, such as:
After fetching the entries, that same template sets or appends $filter so entries are not fetched again by the next included template's category.
My problem is that $filter does not survive from one included file to the next. Is there any way to do this?
Code: Select all
{if $condition_1}{include file="content_1.tpl"}{/if}
{if $condition_2}{include file="content_2.tpl"}{/if}
{if $condition_3}{include file="content_3.tpl"}{/if}Code: Select all
{serendipity_fetchPrintEntries limit="0,5" category=1 noCache=false fetchDrafts=false full=false use_footer=false prevent_reset=true filter_sql="$filter" template="entries_1.tpl"}My problem is that $filter does not survive from one included file to the next. Is there any way to do this?