Results 1 to 12 of 12

Thread: Google Indexing: meta description and meta keywords

  1. #1
    New user
    Join Date
    03-24-10.
    Posts
    13

    Default Google Indexing: meta description and meta keywords

    Hi to all,
    I don't know if there's an answer to what I'm looking for, but I didn't find it!
    I want to know (1)if it's possible to make the catalog items' pages indexable by search engines, (2)if there's the possibility to give to the items' pages the meta keyword and description by a "keywords" and "description" field and (3)if is possible to create one page with all the catalog's items titles list.
    If these things are possible, can you give me the "directions" that I have to follow to realize it?
    Thanks a lot.

    I NEED HELP PLEASE! :cry:

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Google Indexing: meta description and meta keywords

    Edit the catalog and enable the SEARCH option and select the TITLE field to be used, e.g. ProductTitle for the HTML title window.

    When you run the TL index, you should now see the pages being indexed. This is a standard behaviour and is in the manual.

    Its possible to overrride the KEYWORDS and DESCRIPTION of the page, but these are controlled in TL and in your template, so you'll have to MAP your catalog fields to these arrays.

  3. #3
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Re: Google Indexing: meta description and meta keywords

    Hi Thyon,

    I would be keen to be able to define individual META descriptions for each catalog item.

    Any chance you could expand on how this could be achieved.

  4. #4
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Google Indexing: meta description and meta keywords

    I'll consider adding this as a Feature, as it already allows you to select the Title override, but not description and meta. I believed that like the $GLOBALS['TL_JAVASCRIPT'] and $GLOBALS['TL_CSS'], there should be three more for the page setup
    $GLOBALS['TL_PAGE']['TITLE'] =
    $GLOBALS['TL_PAGE']['META'] =
    $GLOBALS['TL_PAGE']['DESCRIPTION'] =

    That would be nice. Go submit a feature request.

  5. #5
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Re: Google Indexing: meta description and meta keywords

    Hi John,

    I added a feature request http://dev.typolight.org/issues/1851.

    Leo is on the ball as always and responded to the ticket before I could type this :-)

    Means little to me, but I'm sure it does to you. Apparently these overrides are available using the "global page object".

    Hope this helps and you are able to add this as a feature.

  6. #6
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Google Indexing: meta description and meta keywords

    I didn't realise that the page global parameter was already available in the Template as well....

    here is your template code

    <?php

    global $objPage;

    ?>

    <?php foreach ..... ?>

    <?php
    $objPage->pageTitle = $entry['title']['value'];
    $objPage->description = $entry['description']['value'];
    // meta can't be done yet, as I don't know where its overridden... I've added this to the feature request ticket.
    ?>

    <?php endforeach; ?>

  7. #7
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Re: Google Indexing: meta description and meta keywords

    Thanks for this. I have edited catalog_full.tpl.

    I am either putting in the wrong template, or implementing wrongly:
    Code:
    <?php
    global $objPage;
    ?>
    <?php if (count($this->entries)): ?>
    
    <div class="layout_full">
    
    <?php foreach ($this->entries as $entry): ?>
    <?php
    $objPage->pageTitle = $entry['seo_page_title']['value'];
    $objPage->description = $entry['seo_page_desc']['value'];
    ?>

  8. #8
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Google Indexing: meta description and meta keywords

    That's right. Just check that the $objPage is actually modified correctly. Otherwise leo's global isn't working inside a template.

  9. #9
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Re: Google Indexing: meta description and meta keywords

    I have updated the ticket.

    Still cannot get the title to change :-)

    I can change the META page description like this:

    $objPage->description = $entry['data']['seo_page_desc']['value'];

    But this does not change the title:

    $objPage->pageTitle = $entry['data']['seo_page_title']['value'];

    Strangely this renders in HTML and had the correct vallue from the catalog:

    Code:
    seo_page_title: <?php echo $entry['data']['seo_page_title']['value']; ?></p>
    Test page: http://cms-2.doublespark.eu/properti...erborough.html

    Code:
    <?php
    global $objPage;
    $objPage->pageTitle = $entry['data']['seo_page_title']['value'];
    $objPage->title = $entry['data']['seo_page_title']['value'];
    $objPage->description = $entry['data']['seo_page_desc']['value'];
    ?>
    
    
    seo_page_title: <?php echo $entry['data']['seo_page_title']['value']; ?></p>
    
    
    seo_page_desc: <?php echo $entry['data']['seo_page_desc']['value']; ?></p>
    
    
    $objPage->pageTitle: <?php echo $objPage->pageTitle; ?></p>
    
    
    $objPage->title: <?php echo $objPage->title; ?></p>

  10. #10
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Re: Google Indexing: meta description and meta keywords

    I figured out what I was doing wrong.

    The template $objPage->mainTitle was being overwritten as I had already set a page title field in the main catalog config page.

    :arrow: ops:

  11. #11
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Google Indexing: meta description and meta keywords

    You can override the keywords using the TL global:

    $GLOBALS['TL_KEYWORDS'] .= addyourkeywordshere.

    I have also integrated this into the new version 2.0 build, so you can select the alias, published, title, description and keywords field, which the READER will render and override.

  12. #12
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Re: Google Indexing: meta description and meta keywords

    Excellent, many thanks for that.

    Looking forward to 2.0 :-)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •