Using module variable outside - in a page template

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
cisco
Forum Members
Forum Members
Posts: 19
Joined: Sun Nov 25, 2007 8:16 pm
Location: Serbia

Using module variable outside - in a page template

Post 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
viebig

Re: Using module variable outside - in a page template

Post by viebig »

check smarty manual and the forum about capture content, you should find what you´re lookin for
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Using module variable outside - in a page template

Post 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
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Post Reply

Return to “CMSMS Core”