Magento Forum

   
Meta tags for each page
 
kharisma
Member
 
Total Posts:  67
Joined:  2007-10-18
Australia
 

In the CMS_Page table of the database, there are columns for meta description and meta keywords.

I cannot see any way of entering those values through the CMS page panel of the admin area.

How do we set different keywords and so forth for a particular page, different from the overall settings for the site?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

There should be “Meta Data” tab on the left, under “General Information”

 
Magento Community Magento Community
Magento Community
Magento Community
 
kharisma
Member
 
Total Posts:  67
Joined:  2007-10-18
Australia
 

Thanks

Didn’t notice that.

BTW, when will it be possible to include some php code in the custom pages?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

You can create php class as block and use it in CMS pages as {{block type=’yourmodule/your_block’}}

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

There’s already documentation about how to create custom payment module, which doesn’t include declaration of blocks, but it is similar to declaration of models, need to put in config.xml of new module following:

<config>
...
  <global>
    <
blocks>
       <
yourmodule>
          <class>
Mage_YourModule_Block</class>
       </
yourmodule>
  </global>
</
config>
then type="yourmodule/your_block" will refer to Mage_YourModule_Block_Your_Block class, which can be extended from any other block, i’d suggest looking at Mage_Core_Block_*
The ultimate method that is going to output HTML is ->toHtml()

 
Magento Community Magento Community
Magento Community
Magento Community
 
kharisma
Member
 
Total Posts:  67
Joined:  2007-10-18
Australia
 

Thanks. I’ll look into that.

With regard to processing forms, is there some way to put the data back into the form so the visitor can complete it?

I usually validate forms server-side, but cannot seem to return the data yet. I am looking at a way to use php to create a javascript script that puts the values in, but am still experimenting.

It is an interesting exercise getting a custom form to work in this environment.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

make <form action="{{store url=’yourmodule/form/save’}}">, this will make the form to submit to app/code/core/Mage/YourModule/controllers/FormController.php:

<?php

class Mage_YourModule_FormController extends Mage_Core_Controller_Front_Action
{
  
public function saveAction()
  
{
    
// do your form processing here
    //print_r($_POST);

    // redirect somewhere
    
$this->_redirect('yourmodule/form/success');
  
}
}

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top