СправошнаяПоиск

Кастомный title для новостей с пагинацией

# Show page number (used on all blog pages)
temp.blogTitle = COA
temp.blogTitle {
  if.isTrue.data = GP:tx_news_pi1|@widget_0|currentPage
  10 = TEXT
  10 {
    data = GP:tx_news_pi1|@widget_0|currentPage
    intval = 1
    htmlSpecialChars = 1
  }
  wrap =  - page |
}
# Blog List page (pagination)
[globalVar = GP:tx_news_pi1|@widget_0|currentPage > 0]
page.config.noPageTitle = 2
page.headerData.5 = COA
page.headerData.5 {
  10 = TEXT
  10.value = Blog
  20 < temp.blogTitle
  wrap = <title>|</title>
}
[global]
# Categories:
[globalVar = GP:tx_news_pi1|overwriteDemand|categories > 0]
temp.categoryTitle = RECORDS
temp.categoryTitle {
  if.isTrue.data = GP:tx_news_pi1|overwriteDemand|categories
  dontCheckPid = 1
  tables = tx_news_domain_model_category
  source.data = GP:tx_news_pi1|overwriteDemand|categories
  source.intval = 1
  conf.tx_news_domain_model_category = TEXT
  conf.tx_news_domain_model_category {
    field = title
    htmlSpecialChars = 1
  }
}
page.config.noPageTitle = 2
page.headerData.5 = COA
page.headerData.5 {
  10 < temp.categoryTitle
  20 < temp.blogTitle
  wrap = <title> | &nbsp;- Blog</title>
}
page.10.variables.pageTitle < temp.categoryTitle
[global]
# Archive:
[globalVar = GP:tx_news_pi1|overwriteDemand|year > 0]
temp.archiveTitle = COA
temp.archiveTitle {
  if.isTrue.data = GP:tx_news_pi1|overwriteDemand|year
  10 = TEXT
  10 {
    data = GP:tx_news_pi1|overwriteDemand|month
    intval = 1
    htmlSpecialChars = 1
    wrap = | /
  }
  20 = TEXT
  20 {
    data = GP:tx_news_pi1|overwriteDemand|year
    intval = 1
    htmlSpecialChars = 1
  }
  30 < temp.blogTitle
}
page.config.noPageTitle = 2
page.headerData.5 >
page.headerData.5 < temp.archiveTitle
page.headerData.5.wrap = <title> | &nbsp;- Blog</title>
page.10.variables.pageTitle < temp.archiveTitle
[global]