Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.

This is an old revision of the document!


Setting up META Tags

Source: osCMax Forums - Thanks to michael_s

The current META Tag mod in osCMax 100% dynamically generates the tags based on the page content. You can manually edit the meta_tags.php file for each and every different page in your site to add whatever you like or modify the tags.

  • Open meta_tags.php, and look for the following code:

   // Optional customization options for each language
        switch ($languages_id) {
   // English language
        case '1':
   //Extra keywords that will be outputted on every page
        $mt_extra_keywords = '';
   //Descriptive tagline of your web site
        $web_site_tagline = TERTIARY_SECTION . '';
        break;

  • The line which you need to look to edit is the $mt_extra_keywords = '';
  • Editting this line will allow you to add your own specific keywords seperated by ,s.
    • $mt_extra_keywords = 'keyword1,keyword2,keyword3';

Setting up Custom Text

  • Next, to add your own custom text, you can add it to this section:

   // Define Primary Section Output
        define('PRIMARY_SECTION', ' : ');
        define('TITLE', 'AABox Web Hosting');
   // Define Secondary Section Output
        define('SECONDARY_SECTION', ' - ');

  • Enter your text inside the single quotes within the defines.
    • eg. define('TITLE', 'AABox Web Hosting');
  • This will add keywords and custom text sitewide.

Setting up Custom Text for seperate pages

  • To add customization to single pages, scroll down the meta_tags.php file and edit the individual page settings. For example:

       case CONTENT_INDEX_DEFAULT:
       define('META_TAG_TITLE', TITLE . PRIMARY_SECTION . HEADING_TITLE . $web_site_tagline);
       define('META_TAG_DESCRIPTION', 'custom text here' . TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
       define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . HEADING_TITLE);
       break;

  • If you place the extra 'custom text here' in the case CONTENT_INDEX_DEFAULT statement, it will output:
    • custom text here
  • on the default index page and all pages that use the default index. Simply add the custom text in whichever case you want to add to.
  • You can place the custom text in any of the defined variables like this:

       case CONTENT_INDEX_DEFAULT:
       define('META_TAG_TITLE', TITLE . PRIMARY_SECTION . HEADING_TITLE . $web_site_tagline);
       define('META_TAG_DESCRIPTION', 'custom text here' . TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . 'custom text here too' . WEB_SITE_KEYWORDS);
       define('META_TAG_KEYWORDS', 'custom,keywords,here' . WEB_SITE_KEYWORDS . HEADING_TITLE);
       break;

  • Bookmark at
  • Bookmark "Setting up META Tags" at Reddit
  • Bookmark "Setting up META Tags" at Google
  • Bookmark "Setting up META Tags" at Facebook
  • Bookmark "Setting up META Tags" at Twitter
  • Bookmark "Setting up META Tags" at Slashdot
set_up_meta_tags.1256938381.txt.gz ยท Last modified: 2009/10/30 14:33 by pgmarshall
You are here: startset_up_meta_tags
Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0