Zitat von
Andreas
Versuche dein Template anzupassen. Hiermit kannst du dir die Variablen ausgeben lassen.
PHP-Code:
<?php $this->showTemplateVars() ?>
Hallo Andreas,
ich habe mir die Variablen ausgeben lassen, ich verstehe jedoch nicht, wie ich das Template entsprechend anpassen kann.
Es wird folgendes ausgegeben:
PHP-Code:
Array
(
[id] => 142
[pid] => 4
[tstamp] => 1481022944
[name] => Artikel > Auszeichnungen
[headline] =>
[type] => taglistbycategory
[levelOffset] => 0
[showLevel] => 0
[hardLimit] =>
[showProtected] =>
[defineRoot] =>
[rootPage] => 0
[navigationTpl] =>
[pages] => Array
(
)
[showHidden] =>
[customLabel] =>
[autologin] =>
[jumpTo] => 0
[redirectBack] =>
[cols] => 2cl
[editable] =>
[memberTpl] =>
[tableless] =>
[form] => 0
[searchType] => simple
[fuzzy] =>
[contextLength] => 48
[totalLength] => 1000
[perPage] => 0
[queryType] => and
[searchTpl] =>
[inColumn] => main
[skipFirst] => 0
[loadFirst] =>
[size] =>
[transparent] =>
[flashvars] =>
[altContent] =>
[source] => internal
[singleSRC] =>
[url] =>
[interactive] =>
[flashID] =>
[flashJS] =>
[imgSize] =>
[useCaption] =>
[fullsize] =>
[multiSRC] =>
[html] =>
[protected] =>
[groups] =>
[guests] =>
[cssID] =>
[space] => Array
(
[0] =>
[1] =>
)
[cal_calendar] =>
[cal_noSpan] =>
[cal_format] => cal_month
[cal_order] => ascending
[cal_limit] => 0
[cal_template] => event_full
[cal_ctemplate] => cal_default
[cal_startDay] => 1
[com_order] => ascending
[com_moderate] =>
[com_bbcode] =>
[com_requireLogin] =>
[com_disableCaptcha] =>
[com_template] => com_default
[faq_categories] =>
[list_table] =>
[list_fields] =>
[list_where] =>
[list_sort] =>
[list_search] =>
[list_info] =>
[list_info_where] =>
[list_layout] => list_default
[list_info_layout] => info_default
[news_archives] =>
[news_featured] => all_items
[news_jumpToCurrent] =>
[news_metaFields] => a:2:{i:0;s:4:"date";i:1;s:6:"author";}
[news_template] => news_latest
[news_format] => news_month
[news_startDay] => 0
[news_showQuantity] =>
[newsletters] =>
[nl_channels] =>
[nl_hideChannels] =>
[nl_subscribe] =>
[nl_unsubscribe] =>
[nl_template] => nl_simple
[disableCaptcha] =>
[reg_groups] =>
[reg_allowLogin] =>
[reg_skipName] =>
[reg_assignDir] =>
[reg_close] =>
[reg_homeDir] =>
[reg_activate] =>
[reg_jumpTo] => 0
[reg_text] =>
[reg_password] =>
[rss_cache] => 3600
[rss_feed] =>
[rss_template] => rss_default
[cal_showQuantity] =>
[news_order] => descending
[cal_ignoreDynamic] =>
[cal_readerModule] => 0
[faq_readerModule] => 0
[news_readerModule] => 0
[numberOfItems] => 3
[customTpl] =>
[orderPages] =>
[orderSRC] =>
[tag_sourcetables] => a:2:{i:0;s:10:"tl_content";i:1;s:7:"tl_news";}
[hide_on_empty] => 1
[tag_tagtable] => tl_tag
[tag_filter] =>
[tag_tagfield] => tag
[tag_maxtags] => 0
[tag_buckets] => 4
[tag_named_class] =>
[tag_on_page_class] =>
[keep_url_params] =>
[tag_topten] =>
[tag_topten_number] => 10
[tag_related] =>
[tag_topten_expanded] =>
[tag_all_expanded] =>
[news_showtags] =>
[event_showtags] =>
[tag_jumpTo] => 0
[tag_ignore] =>
[objecttype] => tl_article
[tagsource] => tl_content
[pagesource] => 1125
[articlelist_template] => mod_global_articlelist
[cloud_template] => mod_tagcloud
[scope_template] => mod_tagscope
[clear_text] => Auszeichnungen
[show_empty_scope] =>
[tag_show_reset] =>
[sharebuttons_networks] =>
[sharebuttons_theme] =>
[sharebuttons_template] =>
[ml_groups] =>
[ml_fields] =>
[dk_cfsMultiSRC] =>
[dk_cfsSortBy] =>
[dk_cfsImageSize] =>
[dk_cfsFullsize] =>
[dk_cfsNumberOfItems] => 0
[dk_cfsUseThumbnails] =>
[dk_cfsThumbnailsVisibleSelect] =>
[dk_cfsThumbnailSize] =>
[dk_cfsThumbnailsVisible] => 5
[dk_cfsThumbnailsPosition] =>
[dk_cfsThumbnailsAlign] =>
[dk_cfsThumbnailsWidth] =>
[dk_cfsThumbnailsHeight] =>
[dk_cfsCarouFredSel] =>
[dk_cfsSynchronise] =>
[dk_cfsHtmlTpl] =>
[dk_cfsCssTpl] =>
[dk_cfsJsTpl] =>
[dk_cfsGalleryTpl] =>
[news_categories] =>
[news_customCategories] =>
[news_filterCategories] =>
[news_relatedCategories] =>
[news_filterDefault] =>
[news_filterPreserve] =>
[news_resetCategories] =>
[news_categoriesRoot] => 0
[text] =>
[addImage] =>
[alt] =>
[title] =>
[imagemargin] =>
[imageUrl] =>
[caption] =>
[floating] =>
[related_numberOfItems] => 0
[related_priority] =>
[related_match] =>
[thumbSize] =>
[typePrefix] => ce_
[hl] => h1
[origSpace] => Array
(
[0] =>
[1] =>
)
[origCssID] => Array
(
[0] =>
[1] =>
)
[Template] => Contao\FrontendTemplate Object
(
[strBuffer:protected] =>
[strContentType:protected] => text/html
[arrData:protected] => Array
*RECURSION*
[strTemplate:protected] => mod_tag_listbycategory
[strParent:protected] =>
[strDefault:protected] =>
[strFormat:protected] => html5
[strTagEnding:protected] => >
[arrBlocks:protected] => Array
(
)
[arrBlockNames:protected] => Array
(
)
[arrCache:protected] => Array
(
)
[arrObjects:protected] => Array
(
[Config] => Contao\Config Object
(
[Files:protected] =>
[strTop:protected] =>
[strBottom:protected] =>
[blnIsModified:protected] =>
[arrData:protected] => Array
(
)
[arrCache:protected] => Array
(
)
)
[Session] => Contao\Session Object
(
[arrSession:protected] => Array
(
[news_showtags] =>
[news_jumpto] =>
[news_tag_named_class] =>
[captcha_captcha] => Array
(
[sum] => 9
[key] => cf8b4b5a5c86e344821471dc34def6638
[time] => 1482158677
)
)
)
[NewsHits] => NewsHits Object
(
[arrMeta:protected] => Array
(
)
[arrAux:protected] => Array
(
)
[arrProcessed:protected] => Array
(
)
[arrCache:protected] => Array
(
)
[arrObjects:protected] => Array
(
[Config] => Contao\Config Object
(
[Files:protected] =>
[strTop:protected] =>
[strBottom:protected] =>
[blnIsModified:protected] =>
[arrData:protected] => Array
(
)
[arrCache:protected] => Array
(
)
)
[Session] => Contao\Session Object
(
[arrSession:protected] => Array
(
[news_showtags] =>
[news_jumpto] =>
[news_tag_named_class] =>
[captcha_captcha] => Array
(
[sum] => 9
[key] => cf8b4b5a5c86e344821471dc34def6638
[time] => 1482158677
)
)
)
[Database] => Contao\Database\Mysql Object
(
[arrConfig:protected] => Array
(
[dbCharset] => UTF8
[dbDatabase] => db_3267_16_dcb
[dbDriver] => MySQL
[dbHost] => mysql.bytecamp.net
[dbPass] => joDh26dKAn
[dbPconnect] => 1
[dbPort] => 3306
[dbSocket] =>
[dbSqlMode] =>
[dbUser] => db_3267_16_dcb
)
[resConnection:protected] => Resource id #45
[blnDisableAutocommit:protected] =>
[arrCache:protected] => Array
(
)
[strListTables:protected] => SHOW TABLES FROM `%s`
)
)
)
[ShareButtons] => ShareButtons Object
(
)
[TreePicker\TreePickerHelper] => TreePicker\TreePickerHelper Object
(
[arrCache:protected] => Array
(
)
[arrObjects:protected] => Array
(
[Config] => Contao\Config Object
(
[Files:protected] =>
[strTop:protected] =>
[strBottom:protected] =>
[blnIsModified:protected] =>
[arrData:protected] => Array
(
)
[arrCache:protected] => Array
(
)
)
[Session] => Contao\Session Object
(
[arrSession:protected] => Array
(
[news_showtags] =>
[news_jumpto] =>
[news_tag_named_class] =>
[captcha_captcha] => Array
(
[sum] => 9
[key] => cf8b4b5a5c86e344821471dc34def6638
[time] => 1482158677
)
)
)
[Database] => Contao\Database\Mysql Object
(
[arrConfig:protected] => Array
(
[dbCharset] => UTF8
[dbDatabase] => db_3267_16_dcb
[dbDriver] => MySQL
[dbHost] => mysql.bytecamp.net
[dbPass] => joDh26dKAn
[dbPconnect] => 1
[dbPort] => 3306
[dbSocket] =>
[dbSqlMode] =>
[dbUser] => db_3267_16_dcb
)
[resConnection:protected] => Resource id #45
[blnDisableAutocommit:protected] =>
[arrCache:protected] => Array
(
)
[strListTables:protected] => SHOW TABLES FROM `%s`
)
)
)
)
)
[news] => Array
(
[0] => Array
(
[id] => 313
[pid] => 22
[tstamp] => 1481898919
[headline] => Bunt, persönlich, multimedial
[alias] => bunt-persoenlich-multimedial
[author] => drehscheibe-Redaktion
[date] => 1481892000
[time] => 1481892000
[subheadline] => Jugendliche schreiben für Jugendliche
[teaser] =>
Drei Praxisbeispiele zeigen, wie Jugendliche für junge Leser über Wahlen und Politik schreiben. Teil 3: Spreewild.
[addImage] => 1
[singleSRC] => ???Ü????z1??
[alt] => (c) Fotolia – VIGE.co
[size] => a:3:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";}
[imagemargin] => a:5:{s:6:"bottom";s:0:"";s:4:"left";s:0:"";s:5:"right";s:0:"";s:3:"top";s:0:"";s:4:"unit";s:0:"";}
[imageUrl] =>
[fullsize] =>
[caption] =>
[floating] => above
[addEnclosure] =>
[enclosure] =>
[source] => default
[jumpTo] => 0
[articleId] => 0
[url] =>
[target] =>
[cssClass] =>
[noComments] =>
[featured] =>
[published] => 1
[start] =>
[stop] =>
[tags] =>
[sharebuttons_networks] =>
[sharebuttons_theme] =>
[sharebuttons_template] => sharebuttons_default
[ps_title] =>
[ps_search_content] =>
[ps_tags] =>
[ps_block_item] =>
[ps_block_usergroup] =>
[hits] => 1
[categories] => a:1:{i:0;s:1:"5";}
[authorId] => 5
[archive] => Dossier-Wahlen
[parentJumpTo] => 436
)
[1] => Array
(
[id] => 312
[pid] => 22
[tstamp] => 1481898882
[headline] => Perspektivwechsel
[alias] => perspektivwechsel
[author] => drehscheibe-Redaktion
[date] => 1481891160
[time] => 1481891160
[subheadline] => Jugendliche schreiben für Jugendliche
[teaser] =>
Drei Praxisbeispiele zeigen, wie Jugendliche für junge Leser über Wahlen und Politik schreiben. Teil 2: Stimmt!.
[addImage] => 1
[singleSRC] => ???Ü????z1??
[alt] => (c) Fotolia – VIGE.co
[size] => a:3:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";}
[imagemargin] => a:5:{s:6:"bottom";s:0:"";s:4:"left";s:0:"";s:5:"right";s:0:"";s:3:"top";s:0:"";s:4:"unit";s:0:"";}
[imageUrl] =>
[fullsize] =>
[caption] =>
[floating] => above
[addEnclosure] =>
[enclosure] =>
[source] => default
[jumpTo] => 0
[articleId] => 0
[url] =>
[target] =>
[cssClass] =>
[noComments] =>
[featured] =>
[published] => 1
[start] =>
[stop] =>
[tags] =>
[sharebuttons_networks] =>
[sharebuttons_theme] =>
[sharebuttons_template] => sharebuttons_default
[ps_title] =>
[ps_search_content] =>
[ps_tags] =>
[ps_block_item] =>
[ps_block_usergroup] =>
[hits] => 0
[categories] => a:1:{i:0;s:1:"5";}
[authorId] => 5
[archive] => Dossier-Wahlen
[parentJumpTo] => 436
)
[2] => Array
(
[id] => 310
[pid] => 22
[tstamp] => 1481891976
[headline] => „Es wächst zusammen."
[alias] => es-waechst-zusammen
[author] => drehscheibe-Redaktion
[date] => 1481889720
[time] => 1481889720
[subheadline] => Jugendliche schreiben für Jugendliche
[teaser] =>
Drei Praxisbeispiele zeigen, wie Jugendliche für junge Leser über Wahlen und Politik schreiben. Teil 1: ZiSH.
[addImage] => 1
[singleSRC] => ?MÇ????z1??
[alt] => (c) Fotolia – VIGE.co
[size] => a:3:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";}
[imagemargin] => a:5:{s:6:"bottom";s:0:"";s:4:"left";s:0:"";s:5:"right";s:0:"";s:3:"top";s:0:"";s:4:"unit";s:0:"";}
[imageUrl] =>
[fullsize] =>
[caption] =>
[floating] => above
[addEnclosure] =>
[enclosure] =>
[source] => default
[jumpTo] => 0
[articleId] => 0
[url] =>
[target] =>
[cssClass] =>
[noComments] =>
[featured] =>
[published] => 1
[start] =>
[stop] =>
[tags] =>
[sharebuttons_networks] =>
[sharebuttons_theme] =>
[sharebuttons_template] => sharebuttons_default
[ps_title] =>
[ps_search_content] =>
[ps_tags] =>
[ps_block_item] =>
[ps_block_usergroup] =>
[hits] => 0
[categories] => a:1:{i:0;s:1:"5";}
[authorId] => 5
[archive] => Dossier-Wahlen
[parentJumpTo] => 436
)
[3] => Array
(
[id] => 213
[pid] => 9
[tstamp] => 1482143796
[headline] => Willst Du mit mir gehen?
[alias] => willst-du-mit-mir-gehen
[author] => drehscheibe-Redaktion
[date] => 1481556540
[time] => 1481556540
[subheadline] => drehscheibe 14/2016
[teaser] =>
Welche Informationsquelle ist bei jungen Menschen beliebter: die Lokalzeitung oder der personalisierte Facebook-Feed? Die Antwort liegt auf der Hand. Die viel relevantere Frage lautet also: Wie können Zeitungen die junge Zielgruppe begeistern und für sich gewinnen? Dem gingen wir für die neue Ausgabe zum Thema „Junge Leserinnen und Leser“ (14/2016) nach.
[addImage] => 1
[singleSRC] =>
?6??????z1??
[alt] => Die Volontäre der bpb stellen die neue Ausgabe vor
[size] => a:3:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";}
[imagemargin] => a:5:{s:6:"bottom";s:0:"";s:4:"left";s:0:"";s:5:"right";s:0:"";s:3:"top";s:0:"";s:4:"unit";s:0:"";}
[imageUrl] => video/willst-du-mit-mir-gehen.html
[fullsize] =>
[caption] =>
[floating] => above
[addEnclosure] =>
[enclosure] =>
[source] => default
[jumpTo] => 0
[articleId] => 0
[url] =>
[target] =>
[cssClass] =>
[noComments] =>
[featured] =>
[published] => 1
[start] =>
[stop] =>
[tags] =>
[sharebuttons_networks] =>
[sharebuttons_theme] =>
[sharebuttons_template] => sharebuttons_default
[ps_title] =>
[ps_search_content] =>
[ps_tags] =>
[ps_block_item] =>
[ps_block_usergroup] =>
[hits] => 0
[categories] => a:2:{i:0;s:2:"11";i:1;s:2:"10";}
[authorId] => 5
[archive] => Videos
[parentJumpTo] => 1137
)
[4] => Array
(
[id] => 200
[pid] => 12
[tstamp] => 1482155360
[headline] => Junge Leserinnen und Leser
[alias] => junge-leserinnen-und-leser
[author] => drehscheibe-Redaktion
[date] => 1481539920
[time] => 1481539920
[subheadline] => drehscheibe 14/2016
[teaser] =>
Welche Informationsquelle ist bei jungen Menschen beliebter: die Lokalzeitung oder der personalisierte Facebook-Feed? Die Antwort liegt wohl auf der Hand. Die viel relevantere Frage lautet also: Wie können Zeitungen die junge Zielgruppe begeistern und für sich gewinnen? Mit dieser Frage befasst sich diese Ausgabe der drehscheibe (14/16).
[addImage] => 1
[singleSRC] => pXH:?\????z1??
[alt] => drehscheibe 14/2016
[size] => a:3:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";}
[imagemargin] => a:5:{s:6:"bottom";s:0:"";s:4:"left";s:0:"";s:5:"right";s:0:"";s:3:"top";s:0:"";s:4:"unit";s:0:"";}
[imageUrl] =>
[fullsize] =>
[caption] =>
[floating] => above
[addEnclosure] =>
[enclosure] =>
[source] => default
[jumpTo] => 0
[articleId] => 0
[url] =>
[target] =>
[cssClass] =>
[noComments] =>
[featured] =>
[published] => 1
[start] =>
[stop] =>
[tags] =>
[sharebuttons_networks] =>
[sharebuttons_theme] =>
[sharebuttons_template] => sharebuttons_default
[ps_title] =>
[ps_search_content] =>
[ps_tags] =>
[ps_block_item] =>
[ps_block_usergroup] =>
[hits] => 2
[categories] => a:1:{i:0;s:1:"7";}
[authorId] => 5
[archive] => Ausgaben
[parentJumpTo] => 6
)
[5] => Array
(
[id] => 148
[pid] => 22
[tstamp] => 1481302432
[headline] => Im Chat mit den Kandidaten
[alias] => im-chat-mit-den-kandidaten
[author] => drehscheibe-Redaktion
[date] => 1481023980
[time] => 1481023980
[subheadline] => Drehbuch
[teaser] =>
Die Pforzheimer Zeitung lässt Schüler im WhatsApp-Chat die Positionen der Spitzenkandidaten in Frage stellen.
[addImage] => 1
[singleSRC] => ?a?????z1??
[alt] => Pforzheimer Zeitung Aktion Whatsapp mit Schülern und Politikern
[size] => a:3:{i:0;s:3:"492";i:1;s:0:"";i:2;s:12:"proportional";}
[imagemargin] => a:5:{s:6:"bottom";s:0:"";s:4:"left";s:0:"";s:5:"right";s:0:"";s:3:"top";s:0:"";s:4:"unit";s:0:"";}
[imageUrl] =>
[fullsize] =>
[caption] =>
[floating] => above
[addEnclosure] =>
[enclosure] =>
[source] => default
[jumpTo] => 0
[articleId] => 0
[url] =>
[target] =>
[cssClass] =>
[noComments] =>
[featured] =>
[published] => 1
[start] =>
[stop] =>
[tags] =>
[sharebuttons_networks] =>
[sharebuttons_theme] =>
[sharebuttons_template] => sharebuttons_default
[ps_title] =>
[ps_search_content] =>
[ps_tags] =>
[ps_block_item] =>
[ps_block_usergroup] =>
[hits] => 0
[categories] => a:1:{i:0;s:1:"5";}
[authorId] => 5
[archive] => Dossier-Wahlen
[parentJumpTo] => 436
)
[6] => Array
(
[id] => 172
[pid] => 12
[tstamp] => 1481116699
[headline] => Wer wie was – Kindermedienangebote von Lokalzeitungen
[alias] => wer-wie-was-kindermedienangebote-von-lokalzeitungen
[author] => drehscheibe-Redaktion
[date] => 1475323560
[time] => 1475323560
[subheadline] => drehscheibe 11/2016
[teaser] =>
Onlineseiten, Magazine, Mitmachaktionen – die besten Kindermedienangebote von Lokalzeitungen
[addImage] => 1
[singleSRC] => ?üz????z1??
[alt] => drehscheibe 11/2016
[size] => a:3:{i:0;s:0:"";i:1;s:0:"";i:2;s:0:"";}
[imagemargin] => a:5:{s:6:"bottom";s:0:"";s:4:"left";s:0:"";s:5:"right";s:0:"";s:3:"top";s:0:"";s:4:"unit";s:0:"";}
[imageUrl] =>
[fullsize] =>
[caption] =>
[floating] => above
[addEnclosure] =>
[enclosure] =>
[source] => default
[jumpTo] => 0
[articleId] => 0
[url] =>
[target] =>
[cssClass] =>
[noComments] =>
[featured] =>
[published] => 1
[start] =>
[stop] =>
[tags] =>
[sharebuttons_networks] =>
[sharebuttons_theme] =>
[sharebuttons_template] => sharebuttons_default
[ps_title] =>
[ps_search_content] =>
[ps_tags] =>
[ps_block_item] =>
[ps_block_usergroup] =>
[hits] => 0
[categories] =>
[authorId] => 5
[archive] => Ausgaben
[parentJumpTo] => 6
)
)
[lngArticles] =>
[lngPages] =>
[lngContentElements] =>
[lngNews] =>
[lngEvents] =>
[style] =>
[class] => mod_taglistbycategory
)
Nun habe ich aber absolut keinen Plan, wie ich dann den Nachrichtenteaser in der Liste anzeigen kann. Das Template sieht aktuell so aus:
PHP-Code:
<div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<?php if ($this->headline): ?>
<<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
<?php endif; ?>
<?php if (count($this->news)): ?>
<h3><?php echo $this->lngNews; ?></h3>
<ul>
<?php foreach ($this->news as $article): ?>
<li>
{{news::<?php echo $article['alias']; ?>}}
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php if (count($this->events)): ?>
<h3><?php echo $this->lngEvents; ?></h3>
<ul>
<?php foreach ($this->events as $event): ?>
<li>
{{event::<?php echo $event['alias']; ?>}}
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php if (count($this->pages)): ?>
<h3><?php echo $this->lngPages; ?></h3>
<ul>
<?php foreach ($this->pages as $page): ?>
<li>
{{link::<?php echo $page['alias']; ?>}}
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
Hast du vielleicht noch eine Idee?
Herzlichen Dank!
dudette.