Jump to content

Template hooks - passing variables from hook's php file to template


Thrillerek

Recommended Posts

Posted

Yeah, still getting used to the new version. I tried the following code:

/* !Hook Data - DO NOT REMOVE */
public static function hookData() {
	$test_var = 'a test value';

	return array_merge_recursive( array (
  		'profile' => array (
    		0 => array (
      			'selector' => '#elProfileInfoColumn > div.ipsAreaBackground_light.ipsPad',
      			'type' => 'add_inside_start',
      			'content' => '{template="test_template" group="plugins" location="front" app="test_app" params="$test_var"}',
    		),
  		),
	), parent::hookData() );
}
/* End Hook Data */

Well, this gives me an error saying that the variable $test_var doesn't exist. So how can I achieve this?

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...