Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Insert Variable into CMS Page
 
LeeOShea
Jr. Member
 
Total Posts:  2
Joined:  2010-11-04
 

I’m a newb and I’m trying to insert a couple of inventory variables into a CMS page.

e.g.
ProductNo1 - Only X items left
ProductNo2 - Only X items left
and so on…

I’ve seen examples of trying to put these directly into php pages but I can’t work out how I can put them into CMS pages.

Any ideas????

Lee

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Moderator
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

If you want to include dynamic script in CMS page then you can simply use {{block}} directive as:

{{block type="core/template" template="path/to/your.phtml"}}
And you can code in your.phtml
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top