Hi I am trying to use the following which I took from the help section for the module..
I think it is right but I just can't get it to work.
{cms_module module='Cataloger' action='random' sub_template='Item-Table-based'}
Any ideas or is this a new bug that has surfaced since .13
Mike
Cataloger - displaying random
Re: Cataloger - displaying random
Hi,
I am really stuck on this!
I have tracked down the problem to be somewhere around this line in the action.random.php file
It doesn seem to be able to read the tpl??
Any ideas gow to hard code a value?
Mike
I am really stuck on this!
I have tracked down the problem to be somewhere around this line in the action.random.php file
Code: Select all
echo $this->ProcessTemplateFromDatabase($this->getTemplateFromAlias($params['sub_template']));
Any ideas gow to hard code a value?
Mike
Re: Cataloger - displaying random
I have actually made a hack to get this to work by using echos rather than passing the vars to a smarty template.
Seems this line is wrong
getTemplateFromAlias($params['sub_template'])
However for th life od me I can't get it to read a tpl! I even tried hard coding in the value with no luck.
If someone could inform me how to pass the values to a smarty I would be very happy
Mike
Seems this line is wrong
getTemplateFromAlias($params['sub_template'])
However for th life od me I can't get it to read a tpl! I even tried hard coding in the value with no luck.
If someone could inform me how to pass the values to a smarty I would be very happy

Mike
Re: Cataloger - displaying random
have you tried putting .tpl on the end...
{cms_module module='Cataloger' action='random' sub_template='Item-Table-based.tpl'}
{cms_module module='Cataloger' action='random' sub_template='Item-Table-based.tpl'}
Re: Cataloger - displaying random
I believe you need to specify a category template, not an item template, for one thing...
{cms_module module='Cataloger' action='random' sub_template='Category-Table-based'}
..and for another, it seems to have a bug doing random where the "count" parameter is required, and it's value must be greater than one.
Works:
{cms_module module='Cataloger' action='random' sub_template='Category-Table-based' count='2'}
Gives me two randomized products, displayed using my category template, as desired.
Breaks:
{cms_module module='Cataloger' action='random' sub_template='Category-Table-based' count='1'}
Gives seven blank items, nothing filled in. Just the template html output 7 times.
Pity, I really want just ONE random image on my homepage.
{cms_module module='Cataloger' action='random' sub_template='Category-Table-based'}
..and for another, it seems to have a bug doing random where the "count" parameter is required, and it's value must be greater than one.
Works:
{cms_module module='Cataloger' action='random' sub_template='Category-Table-based' count='2'}
Gives me two randomized products, displayed using my category template, as desired.
Breaks:
{cms_module module='Cataloger' action='random' sub_template='Category-Table-based' count='1'}
Gives seven blank items, nothing filled in. Just the template html output 7 times.
Pity, I really want just ONE random image on my homepage.
Re: Cataloger - displaying random
Please tell me how to make the random withdrawal of objects from the catalog on all pages of site?