Loading...
 
Skip to main content

Wiki Argument, page; It is now necessary (on Tiki26) to use the wiki variable page and/or limit pagination to 1 to pass it inside a smarty template using it.

Status
Closed
Subject
Wiki Argument, page; It is now necessary (on Tiki26) to use the wiki variable page and/or limit pagination to 1 to pass it inside a smarty template using it.
Version
26.x
Regression from 25.x to 26.x
Category
  • Regression
Feature
Search
Wiki Plugin (extends basic syntax)
Wiki Syntax (text area, parser, external wiki, etc)
Resolution status
Not enough information
Submitted by
Bernard Sfez / Tiki Specialist
Lastmod by
Bernard Sfez / Tiki Specialist
Rating
(0)
Related-to
Description

On Tiki25 I can set on a page a List plugin filtering "this" object title - the page title.
Then the results can be used in a wiki template (with other wikiplugins) and if I use {{page}} inside the template (or other wikiplugins).
The code will know what page (title) I'm talking about.

On Tiki26 this is not enough and the page (title) is "unkown" or picked randomly based on last list result of all the wiki pages even if there is only ONE results (obviously you can have only one page with a title - duplication is not allowed).

See my solutions.



It is on a customized Tiki with a List => Smarty template => Wikiplugin Include AND it work in multilingual.
This to allow a user without page editing permission (test typing only) to edit/translate content of blocks in the page without modifying it.

So I set the importance to low however it may be something we have to look at in the future and other cases.

Solution
  1. page Wiki Argument Variables

I added on the top of the page the following code to "validate" the content of the variable that can be then used properly by the templates.

{DIV(class="d-none")}{{page}}{DIV}

It fixed the issue for some pages

  1. Limit pagination max to 1

Even if there can be only one wiki page with a title the plugin List keep rolling list of pages (similar title ?)

Copy to clipboard
{pagination max="1"}


I fixed the other pages where the issue still persisted.

To be ultra-squared with the code I also set the filter for the page to "exact".

Copy to clipboard
{filter field="title" exact=""}


And as this pages has several plugin list I set each template to use a different prefix for the variables.

IE:

Copy to clipboard
{foreach from=$results item=homeBloc1} {foreach from=$results item=homeBloc2} {foreach from=$results item=homeBloc3} ...
Importance
1 low
Easy to solve?
5
Priority
5
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8466
Created
Sunday 16 July, 2023 12:24:50 UTC
by Bernard Sfez / Tiki Specialist
LastModif
Wednesday 09 August, 2023 11:51:30 UTC


Show PHP error messages