How do I automatically send the value of "Extra Page Attribute 1:" on a content page, to a UDT and store it as a variable there?
Thanks!
[solved] how do we send Extra Page Attribute 1: to a UDT
[solved] how do we send Extra Page Attribute 1: to a UDT
Last edited by blackhawk on Wed Nov 03, 2010 6:28 am, edited 1 time in total.
Re: how do we send Extra Page Attribute 1: to a UDT
Place the following in your UDT:
$content_obj is a smarty variable that contains the object for your page, through it, you can access the extra1 property, among other things.
Code: Select all
$content_obj = $smarty->get_template_vars('content_obj');
$extra1 = $content_obj->GetPropertyValue('extra1');
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: how do we send Extra Page Attribute 1: to a UDT
Code: Select all
{myudt myparam=$some_variable myparam2='some_data'}
Code: Select all
if( isset($params['myparam']) )
{
// do some stuff here.
}
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.
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.
Re: how do we send Extra Page Attribute 1: to a UDT
@calguy: I don't think he's asking how to pass user parameters to a UDT... He's asking how to access the extra1 property of the page from a UDT.
Last edited by Wishbone on Tue Nov 02, 2010 11:03 pm, edited 1 time in total.
Re: how do we send Extra Page Attribute 1: to a UDT
Thank you wishbone, that is what i was looking for. thats a big array - how could we live without it! Thanks calguy for the extra tip too!