Page 1 of 1

Cataloger: Category Template Variables in Main template

Posted: Tue May 28, 2013 10:57 am
by MZTech
Hi,
I am new to this forum, but I have built several websites with CMSMS and I love it! :)

So, here is my question: Can I use Catalogers Category Template Variables in Main template and how?

I tried to put tag {$sometextbox} in main template, but it won't process it.
I kind of expected this behavior, but don't know how to do it any other way.

Thanks guys.

Re: Cataloger: Category Template Variables in Main template

Posted: Tue May 28, 2013 3:20 pm
by Jo Morg
From Cataloger Help:
Variable

You can grab variables (attributes) outside of your Cataloger templates, say in a global content block, using the variable method. The syntax looks like:

{Cataloger action='variable' name='itemnotes' default='no notes'}, where name is the attribute to display (using the same all lower-case, punctuation-free representation like the smarty template variables), and default is the value to use if the attribute is not defined.

Re: Cataloger: Category Template Variables in Main template

Posted: Tue May 28, 2013 10:38 pm
by MZTech
Thank you for your reply.

I still have a problem, it still does not work.

I put:

Code: Select all

{Cataloger action='variable' name='sometextbox' default='no notes'}
inside my main template, but still it does not show.
I tried putting it in global content block, but its the same, nothing.

I want to show it on a Category page, but inside main template, not on the subtemplate for Category page.
I hope you understood me.

Re: Cataloger: Category Template Variables in Main template

Posted: Tue May 28, 2013 11:04 pm
by MZTech
I have found a mistake, but I think it wasn't mine:

If Category Attribute has a " " space inside the name, this wont work. But if you just make a single word without spaces as Category Attribute it will work.

so my 'sometextbox' was "some texbox", now is "sometextbox" in Category Attributes.

Hope it will help someone else also.

Again thank you for your help, I dont know how I missed it, when I read module's help file.