passing php array between diferent user tags

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
antuanjoseff
Forum Members
Forum Members
Posts: 10
Joined: Thu May 04, 2006 3:17 pm

passing php array between diferent user tags

Post by antuanjoseff »

I have a page with this structure.

{user_tagA}

some html tags...

{user_tagB}
{user_tagC}

The user_tagA connects to another database, makes some queries and creates a 3D array.
I would like to use the 3D array in user_tagB, and user_tagC

I read some posts about creating a smarty variable with $smarty->assign('varname',$Array3D').
I managed to do that but then I don't know how to get the smarty varname from the other user_tags.

thanks in advanve.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm
Location: MI

Re: passing php array between diferent user tags

Post by Jeff »

Then do {user_tagB var="$varname"}

It is all laid out in the documentation, look at where it talks about passing parameters.

http://wiki.cmsmadesimple.org/index.php ... fined_Tags
antuanjoseff
Forum Members
Forum Members
Posts: 10
Joined: Thu May 04, 2006 3:17 pm

Re: passing php array between diferent user tags

Post by antuanjoseff »

Thanks a lot!

It's working great!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: passing php array between diferent user tags

Post by Dr.CSS »

Please add [solved] to the first subject line...

He says for the 100,001 time...
Post Reply

Return to “Developers Discussion”