View Single Post
  #4  
Old 02-16-2016, 02:12 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: How to modify Contact Us meta tags?

For the contact us page you should create classes/XLite/Module/XC/CustomSkin/Controller/Customer/ContactUs.php with the following contents and then enable Custom Skin module (or redeploy the store if the module is enabled already):
PHP Code:
<?php

namespace XLite\Module\XC\CustomSkin\Controller\Customer;

/**
 * Decorated controller class.
 * 
 * @LC_Dependencies ("CDev\ContactUs")
 */
class ContactUs extends \XLite\Module\CDev\ContactUs\Controller\Customer\ContactUs implements \XLite\Base\IDecorator
{
    
/**
     * Get meta description
     *
     * @return string
     */
    
public function getMetaDescription()
    {
        return 
'Your custom meta description for pages handled by this controller class';
    }

    
/**
     * Get meta keywords
     *
     * @return string
     */
    
public function getKeywords()
    {
        return 
'Your custom meta keywords for pages handled by this controller class';
    }
}

For other pages you should create similar files, but with a different location/namespace/name of the class being extended. Also, you need the @LC_Dependencies only for controller classes that are added by modules (change it in accordance with the module name), for core classes skip it.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions