Hi,
I need to use some module params in my template file.
So in k2 template file category.php I have this piece of code to get the params to an object :
I need to use some module params in my template file.
So in k2 template file category.php I have this piece of code to get the params to an object :
12 years 2 months ago #131564
What functionality/options to you want your category/ category item have.
If you simple want to display a module you can paste the code in the category_item.php file.
If you simple want to display a module you can paste the code in the category_item.php file.
Topic Author
12 years 2 months ago #131565
In my module I have a param that the user inputs, is called custom_class
the param is a text field containing a custom class for a span element
So I want to get this param once (that's why I put it in category.php)
and then in category-item.php I want it for every item like :
the param is a text field containing a custom class for a span element
So I want to get this param once (that's why I put it in category.php)
and then in category-item.php I want it for every item like :
12 years 2 months ago #131566
You can assign it to a variable in the view ( since it's in the same view ):
$this->mod_obj = json_decode($modparams);
Topic Author
12 years 2 months ago #131567
kalispera,
thanx for the answer,
yes is the same view,
but in which file of the view I shoud assign my object ?
views/itemlist/tmpl/category.php ?
views/item/tmpl/item.php ?
something else ?
thanx for the answer,
yes is the same view,
but in which file of the view I shoud assign my object ?
views/itemlist/tmpl/category.php ?
views/item/tmpl/item.php ?
something else ?
Log in or create an account to reply.