Jump to content

Trouble getting template vars into php in version 6 beta


Recommended Posts

I am trying to modify a template using code that always worked in version 5 and before but doesn't work in 6.

 

This sample from the documentation doesn't work, it crashes.

{php}
$userid = $this->_tpl_vars['clientsdetails']['userid'];
echo 'User ID is '. $userid ;
{/php}

 

This code is working now in 5.3.13 but crashes in 6.0

{php}
$cldetails=$this->get_template_vars("clientsdetails");
echo 'Users ID is '. $cldetails['userid'];
{/php}

 

What am I doing wrong? This is in /templates/mytemplate/clientareaproductdetails.tpl

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated