LISE categories not working when LISE Instance tag present
Posted: Tue Apr 30, 2024 12:41 pm
A strange problem I don't understand why is happening. Maybe someone can explain what is going wrong?
If I have both categories and another LISE Instance tag in a LISE summary template, categories stop working. However the first iteration in the loop does output the category.
My summary template:
However, if I change the way I retrieve categories, I can display categories and the result from the second LISE Instance tag:
I have tried inserting my LISE Instance tag in the default summary template and here categories also stop working!
Maybe someone can explain why it is so, so i can learn template logic?
If I have both categories and another LISE Instance tag in a LISE summary template, categories stop working. However the first iteration in the loop does output the category.
My summary template:
Code: Select all
{if $items|@count > 0}
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th class="border-top-0">Project Number</th>
<th class="border-top-0">Project Name</th>
<th class="border-top-0">Project Type</th>
<th class="border-top-0">Weight Reports</th>
</tr>
</thead>
<tbody>
{foreach from=$items item=item}
{LISELoader item='category' force_array=1 value=$item->project_type assign='cats'}
{$type= "{$cats|implode:','}"}
<tr>
<td class="fw-bold"><a class="link-dark" href="{$item->url}">{$item->project_number}</a></td>
<td class="fw-bold"><a class="link-dark" href="{$item->url}">{$item->title}</a></td>
<td>{$type}</td>
<td>{LISEWeightReports template_summary='itemsCount' xs_project=$item->item_id}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
Code: Select all
{LISELoader item='category' identifier='category_id' instance='LISEProjects' value=$item->project_type assign='type'}
Maybe someone can explain why it is so, so i can learn template logic?