[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Fix debug template rendering when using {select} with limited fields in PluginList
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6931e6e78b87c_2a17c4d8620fb@gitlab-sidekiq-low-urgency-cpu-bound-v2-698d467769-bjfrn.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
592a02c3 by Joseph Ushindi at 2025-12-04T19:46:16+00:00
[FIX] Fix debug template rendering when using {select} with limited fields in PluginList
---
* Fix LIST plugin template compatibility when using {select} statement
See merge request tikiwiki/tiki!9112
- - - - -
1 changed file:
- templates/search/list/debug.tpl
Changes:
=====================================
templates/search/list/debug.tpl
=====================================
@@ -1,7 +1,34 @@
<b>List of returned objects</b>
<ol>
{foreach from=$results item=result}
- <li><a href="{if not empty($result.url)}{$result.url}{else}#{/if}" >{$result.title}</a>
+ <li>
+ {* 1. Use explicit URL from PluginList if available *}
+ {if ! empty($result.url)}
+ <a href="{$result.url|escape}">
+ {$result.title|escape}
+ </a>
+
+ {* 2. Generate URL based on object type + object id *}
+ {elseif ! empty($result.object_type) && ! empty($result.object_id)}
+ <a href="{sefurl type=$result.object_type objectId=$result.object_id}">
+ {if ! empty($result.title)}
+ {$result.title|escape}
+ {else}
+ Item #{$result.object_id}
+ {/if}
+ </a>
+
+ {* 3. Fallback when no URL can be generated *}
+ {else}
+ {if ! empty($result.title)}
+ {$result.title|escape}
+ {elseif ! empty($result.object_id)}
+ Item #{$result.object_id}
+ {else}
+ Unknown Item
+ {/if}
+ {/if}
+ </li>
{/foreach}
</ol>
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/592a02c32557d9b162400318c04f2047672c7359
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/592a02c32557d9b162400318c04f2047672c7359
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs