Page 1 of 1

Using module variable outside - in a page template

Posted: Thu Jul 31, 2008 4:53 pm
by cisco
How do I use a variable from a module in a page template.

To be particular I am working with Company Directory module... and I've created custom fields "meta description" and "meta keywords" ... and they apear on page when inserted in module template ... but dont work in a page template.

I am assuming that not all variables can work outside the module, but if there is some general rule for those that do, it would mean a world to me.

Thanks in advance.
Cisco

Re: Using module variable outside - in a page template

Posted: Thu Jul 31, 2008 7:08 pm
by viebig
check smarty manual and the forum about capture content, you should find what you´re lookin for

Re: Using module variable outside - in a page template

Posted: Thu Jul 31, 2008 11:19 pm
by kermit
page template is processed before which contains the module call... so the variables you want to use do not yet exist when you want to use them.

your solution would be similar to how people get news article titles or company directory company names inserted into the of a page (search the forums for those tricks)

... or ...

wait for the upcoming cmsms 1.4 which will allow of a page template to be processed before its