Forums | Mahara Community

Developers /
viewacl.tpl add view name


anonymous profile picture
Deleted user
Posts: 20

28 October 2011, 2:03 AM

Hi,

 I am adding some extra variables to be passed with the secret URL i.e. http://secretURL?somethingelse?anotherthing

 In particular I am looking to pass the view name i.e. Tom's Resume as part of this. However I can't figure out how to access this in the viewacl.tpl


Can anybody help?

Thanks,

Tom

Ruslan Kabalin's profile picture
Posts: 146

28 October 2011, 3:41 AM

Hello Tom,

You can't access POST and GET variables from the template directly, you have to catch them in the php file and then re-define for use in the tempalte:

// Fetch url parameter
$somethingelse = param_variable('somethingelse', '');
...
// Define template variable
$smarty->assign('somethingelse', $somethingelse);

Now you can access $somethingelse in the tpl file.

Though I am not sure if you really need to pass view name as a parameter. There should be a chance to determine that in the code, unless you want to pass absolutely random text.

2 results