Page 1 of 1

Lise pass variable item parameter

Posted: Sun Jan 10, 2021 9:57 am
by pierrepercee
Hello,
Many research, but definitively can't find the answer...
In a UDT I retrieve the alias of a Lise item
in UDT

Code: Select all

$smarty->assigngnglobal('myalias', $myalias);
If I want to display it in my page template, no problem.

Code: Select all

{$myalias} 
shows me the recovered alias.
In the content of my page I try to call a Lise instance by passing

Code: Select all

$myalias
in parameter

Code: Select all

{LISEwinners action=detail item=$myalias}
Nothing works unfortunately, I have tried everything.

Re: Lise pass variable item parameter

Posted: Sun Jan 10, 2021 5:04 pm
by DIGI3
I couldn't recreate this issue - I tried with $smarty->assign and $smarty->assignglobal and both worked. I would test by manually assigning it in your UDT first to see if it's a typing or other issue, perhaps it's including a hidden character or linefeed or something. In your forum post you have "assignnglobal" but I'm assuming that's just a typo.

My test was:

UDT

Code: Select all

$myalias = foo;
$smarty->assignglobal('myalias', $myalias);
Content

Code: Select all

{myudt}
{LISEtest action=detail item=$myalias}

Re: Lise pass variable item parameter

Posted: Sun Jan 10, 2021 5:37 pm
by pierrepercee
Many thanks DIGI !

I placed the LISE call in the content of the page itself (in Tiny MCE) and there, nothing works, I don't know why...
If I do like you and place the call in the page template everything works well.

Really many thanks ! :)