Class Template and variables

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
r9s
Registered User
Posts: 1
Joined: Wed Sep 08, 2010 2:40 pm

Class Template and variables

Post by r9s »

Hi! I'm using class Template to show some variables on board. My code:

Code: Select all

if(is_array($tags))
	{
		foreach($tags as $kupa => $pupa)
		{
			$template->assign_block_vars('tagiii', array(
			    'FOO' => $pupa,
			));
		}
	}
In cache file it looks like:

Code: Select all

<?php $_tagiii_count = (isset($_postrow_val['tagiii'])) ? sizeof($_postrow_val['tagiii']) : 0;if ($_tagiii_count) {for ($_tagiii_i = 0; $_tagiii_i < $_tagiii_count; ++$_tagiii_i){$_tagiii_val = &$_postrow_val['tagiii'][$_tagiii_i]; ?>

		<?php echo $_tagiii_val['FOO']; ?>
		<?php }}

[...]
And my array $_postrow_val['tagiii'] doesn't exist :( What I'm doing wrong?

Post Reply