Mittel der JQuery Extension "jQCloud" und ein wenig TypoScript konnte ich erfolgreich eine TagCloud basierend auf Tags der "News" Extension implementieren. In den jeweiligen Seiten wird folgender Code zum rendern der TagCloud eingefügt:
<div id="wordcloud" style="min-height: 100px;"></div>
Folgendes Typoscript erzeugt das Javascript-Array:
page.jsInline {
2010 = COA
2010 {
stdWrap.outerWrap (
var word_list = new Array( | );
$(document).ready(function() {
$("#wordcloud").jQCloud(word_list, {encodeURI: false});
});
)
2010 = CONTENT
2010 {
table = tx_news_domain_model_tag
select {
pidInList = <PID der TAGS>
join = tx_news_domain_model_news_tag_mm ON (tx_news_domain_model_news_tag_mm.uid_foreign=tx_news_domain_model_tag.uid)
groupBy = tx_news_domain_model_tag.uid
}
renderObj = COA
renderObj {
10 = TEXT
10.field = title
10.noTrimWrap = |text: "|"|
20 = TEXT
20.numRows.table = tx_news_domain_model_tag
20.numRows.select.pidInList = <PID der TAGS>
20.numRows.select.uidInList.field = uid
20.numRows.select.join = tx_news_domain_model_news_tag_mm ON (tx_news_domain_model_news_tag_mm.uid_foreign=tx_news_domain_model_tag.uid)
20.noTrimWrap = |, weight: ||
30 = TEXT
30.typolink.parameter = <PID Listview>
30.typolink.returnLast = url
30.typolink.additionalParams.dataWrap = &tx_news_pi1[overwriteDemand][tags]={field:uid}
30.typolink.additionalParams.rawUrlEncode = 1
30.typolink.useCacheHash = 1
30.noTrimWrap = |, link: "|"|
wrap = { | }###SPLITTER###
}
stdWrap.split {
token = ###SPLITTER###
cObjNum = 1 |*| 1 |*| 2||3
1 {
current = 1
wrap = |,
}
2 {
current = 1
wrap = |
}
}
}
}
}