[SOLVED]UDT error with $page_alias

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Lesh
New Member
New Member
Posts: 3
Joined: Thu Jan 10, 2008 2:31 pm

[SOLVED]UDT error with $page_alias

Post by Lesh »

Hi i created an UDT called test with the content

Code: Select all

echo $params['text']
This UDT i open in a content page

with

Code: Select all

{test text=$page_alias}
Now i receive following error as well in the preview as on the normal site:

Code: Select all

string(142) "Smarty error: [in content:content_en line 1]: syntax error: invalid attribute name: 'text' 
(Smarty_Compiler.class.php, line 1536)" string(126)
 "Smarty error: [in content:content_en line 1]: syntax error: invalid attribute name: '=' (Smarty_Compiler.class.php, line 1536)" 
string(149) "Smarty error: [in content:content_en line 1]: syntax error: invalid attribute name: '$page_alias' (Smarty_Compiler.class.php, line 1536)"
How can i solve this problem?
Thanks a lot
Last edited by Lesh on Thu Jan 10, 2008 4:34 pm, edited 1 time in total.
cyberman

Re: UDT error with $page_alias

Post by cyberman »

Use {$page_alias} instead :) ...
Lesh
New Member
New Member
Posts: 3
Joined: Thu Jan 10, 2008 2:31 pm

Re: UDT error with $page_alias

Post by Lesh »

Instead of what?

Because i need it in the UDT that:  $variable=Pagealias
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: UDT error with $page_alias

Post by calguy1000 »

Well, I created a UDT called param_test with this content:

Code: Select all

print_r($params); echo '<br/>';
if( isset($params['alias']) ) echo "DEBUG: alias=".$params['alias'].'<br/>';
and called it like this:

Code: Select all

{param_test param1="value1" alias=$page_alias}
and it worked as expected.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Lesh
New Member
New Member
Posts: 3
Joined: Thu Jan 10, 2008 2:31 pm

Re: UDT error with $page_alias

Post by Lesh »

Thank you very much it works now!!!
Post Reply

Return to “CMSMS Core”