Advertisement
jdexo

cObj: CONTENT: fetch records from table + wrap

Jul 17th, 2023
1,439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 20 = CONTENT
  2.     20 {
  3.         table = tx_news_domain_model_news
  4.         select {
  5.             pidInList = {$plugin.tx_news.settings.sitemap.startingpoint}
  6.             recursive = {$plugin.tx_news.settings.sitemap.recursive}
  7.             selectFields = uid,pid,tstamp,sys_language_uid,l10n_parent
  8.             orderBy = tstamp DESC
  9.             max = {$plugin.tx_news.settings.sitemap.limit}
  10.             languageField = sys_language_uid
  11.             where = type=0
  12.         }
  13.  
  14.         renderObj = COA
  15.         renderObj {
  16.             wrap = <url>|</url>
  17.             10 = COA
  18.             10 {
  19.                 wrap = <loc>|</loc>
  20.                 10 = COA
  21.                 10 {
  22.                     # htmlSpecialChar on the link to encode ampersand
  23.                     stdWrap.htmlSpecialChars = 1
  24.                     10 = TEXT
  25.                     10 {
  26.                         typolink {
  27.                             parameter = {$plugin.tx_news.settings.sitemap.detailPid}
  28.                             forceAbsoluteUrl = 1
  29.                             returnLast = url
  30.                             additionalParams.field = uid
  31.                             additionalParams.wrap = &tx_news_pi1[news]=|
  32.                         }
  33.                     }
  34.                 }
  35.             }
  36.  
  37.             20 = TEXT
  38.             20.wrap = <lastmod>|</lastmod>
  39.             20.field = tstamp
  40.             20.date = Y-m-d
  41.         }
  42.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement