First off, let me apologize for the 3 month delay, I've been incredibly busy the past view months and to be honest... I simply forgot I started this blog post during T3DD back in July, so don't blame yourself for not seeing it the past couple of months. Also: Forget the date above, this article has gone live on Oct. 21st.
Imagine the following scenario:
You client wants to have teasers on his website. Teasers should of course be editable by a normal editor without having access to the pages where the teasers themselves are located. This part of the setup is the task of the editor-in-chief.
In case you don't already know:
Every extension slows TYPO3 down a bit - whether you use it on a specific page or not.
Plus, by the time of this writing, every extension will increase memory consumption by a notable amount at EVERY request to a frontend page - no matter if the content is cached or not.
You could use TemplaVoila for this task but maybe you don't want to change the way your editors work or from a techy point-of-view you don't like the way data is saved on TV or the teasers should be on the root-page and you don't want to fiddle around with permissions to get it going.
This is a short breakdown of what I did:
Here is some sample code I did using DAM - please notice I used parts of the predefined code from CSS styled Content, which basically does what I want and I'm a madman in regards of performance so yes... shorter TS Template WILL speed up your website (though in most cases you won't notice it anyways :))
tt_content.menu.20.default.wrap >
tt_content.menu.20.default.1 >
tt_content.menu.20.default {
wrap = <div class="teaserbox">|</div>
1 = TMENU
1.NO.allWrap = <div class="singleteaser">|</div> #optionSplit rules at this place
1.NO.doNotLinkIt = 1
1.NO.doNotShowLink = 1
1.NO.before.cObject = COA
1.NO.before.cObject {
10 = IMAGE
10.file {
import.cObject = USER
import.cObject.refTable = pages
import.cObject.refField = media
import.cObject.userFunc = tx_dam_tsfe->fetchFileList
import.listNum = 0
width = 192c-100
height = 117
}
20 = TEXT
20.field = title
20.wrap = <h2>|</h2>
30 = TEXT
30.field = abstract
30.wrap = <p>|</p>
40 = TEXT
40.value = {$more} »
40.wrap = <p class="morelink">|</p>
40.typolink.parameter.field = uid
}
}
No comments yet. Be the first to comment on this!