Skip to main content
Тему додано 13 років 20 днів тому об 22:03:03

META-теги рекурсивно, з властивостей сторінки


  • Опублікував користувач
    A K

Спочатку потрібно активувати включення необхідних нам полів зі сторінки у т.з. rootline. Для цього додамо такий рядок у typo3conf/localconf.php:

$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] = 'description,keywords,author,abstract';

Тепер можна використати ці поля у TS-template setup таким чином:

page {
  meta {
  #recursive selection of info when not specified in current page
    abstract.field = abstract
    abstract.ifEmpty.data = levelfield : -1, abstract, slide
 
    description.field = description
    description.ifEmpty.data = levelfield : -1, description, slide
 
    keywords.field = keywords
    keywords.ifEmpty.data = levelfield : -1, keywords, slide
    #if using tt_news keyword feature
    keywords.override.data = register : newsKeywords
 
    author.field = author
    author.ifEmpty.data = levelfield : -1, author, slide
 
  #static info
    rating = General
    revisit-after = 7 days
    robots = index, follow, all
    copyright = Copyright © 2010 Company. All rights reserved.
  }
}

Останнє оновлення теми відбулося 13 років 20 днів тому об 22:03:03

Назад до форуму