Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
7 - 2 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: $xoopsTpl - unexpected value for module name
by Venezia on 2003/10/28 1:27:18

Thank you, that's the one I'm after.
Re: $xoopsTpl - unexpected value for module name
by onokazu on 2003/10/27 13:24:54

If you really need to do that, you can also use the get_template_vars($name) function, where $name is the name of the template variable you have assigned.
Re: $xoopsTpl - unexpected value for module name
by lubdub on 2003/10/27 12:24:12

Quote:

Venezia wrote:
But if we shouldn't use _tpl_vars, what is the correct way to access values that have been stored in $xoopsTpl? (from a php file, not from an html template).
I'm more interested in the values passed by the current module to $xoopsTpl rather than the values stored by the xoopsModule object.

Good question. I'm not (yet ) Smarty-savvy enough to answer that, but I'd say:
* if you reference them from a script invoked from your Smarty template, you probably can just reference them (or check the Smarty site)
* if you have filled data into the template in one script and want to retrieve in from another script, your design has a serious flaw. The xoopsTpl is a variable-container for inter-script data transfer.
(furthermore, the variables in the xoopsTpl don't come only from 'the current module', but from all module-blocks, ...)
Re: $xoopsTpl - unexpected value for module name
by Venezia on 2003/10/27 8:20:31

Thanks.

But if we shouldn't use _tpl_vars, what is the correct way to access values that have been stored in $xoopsTpl? (from a php file, not from an html template).

I'm more interested in the values passed by the current module to $xoopsTpl rather than the values stored by the xoopsModule object.
Re: $xoopsTpl - unexpected value for module name
by onokazu on 2003/10/27 7:45:28

$xoopsTpl->_tpl_vars is a private property of the XoopsTpl class, so it shouldn't be used from outside of the class. As you said, you would need to use $xoopsModule->getVar('name') to get the name of the current module.

Who's Online

212 user(s) are online (169 user(s) are browsing Support Forums)


Members: 0


Guests: 212


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits