Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

how_to_remove_the_model_number_and_price_from_the_page_title [2007/12/28 23:02] (current)
michael_s created
Line 1: Line 1:
 +How to edit the dynamic meta tags in osCMax
 +
 +The file you edit is: /​catalog/​includes/​meta_tags.php
 +
 +The code you are concerned with is :
 +<code php>
 +// 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;
 +</​code>​
 +I have emphasized in bold the line to add your specific keywords. Enter them between the single quotes, comma separated, like this:
 +
 +$mt_extra_keywords = '​**keyword1,​word2,​word3**';​
 +
 +That will allow you to add your own specific keywords.
 +
 +Next, to add your own custom text, you can add it to this section:
 +<code php>
 +// Define Primary Section Output
 +define('​PRIMARY_SECTION',​ ' : ');
 +define('​TITLE',​ 'AABox Web Hosting'​);​
 +// Define Secondary Section Output
 +define('​SECONDARY_SECTION',​ ' - ');
 +</​code>​
 +Enter your text between the single quotes in whichever section you want the text to appear.
 +
 +This will add keywords and custom text site wide.
 +
 +To add customization to single pages, scroll down the meta_tags.php file and edit the individual page settings. For example:
 +<code php>
 +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;
 +</​code>​
 +If you place the text in the case **CONTENT_INDEX_DEFAULT** statement, it will output the following in the meta description tag on the default index page and all pages that use the default index. :
 +
 +**custom text here**
 +
 +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:
 +<code php>
 +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;
 +</​code>​
 +Finally, if you want to remove any of the dynamic items, simply remove the variable that corresponds to the dynamic meta info that you want removed from the tag. For instance, to remove the dynamically generated meta description from the index.php page:
 +<code php>
 +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;
 +</​code>​
 +Removing the **. WEB_SITE_KEYWORDS** code will remove all dynamic meta content from the META_TAG_DESCRIPTION. This corresponds to the meta_description html tag. It will just contain your content.
  
how_to_remove_the_model_number_and_price_from_the_page_title.txt ยท Last modified: 2007/12/28 23:02 by michael_s
You are here: starthow_to_remove_the_model_number_and_price_from_the_page_title
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