[TYPO3-english] comments => latest comments ?
Daniel Huf
dhuf at cross-systems.com
Thu May 28 18:41:53 CEST 2009
This is the closest I can get, do have another trick to separate the
"tt_news_120" into 120 ?
the link I get is &tx_ttnews[tt_news]=tt_news_120
hmm
thanks
Daniel
CONSTANTS
lib.page.comments.latest.limit = 10
lib.page.comments.latest.pidInList = 73
lib.page.comments.latest.detailPid = 65
SETUP
lib.page.comments.latest = COA
lib.page.comments.latest.wrap = <div class="comments">|</div>
lib.page.comments.latest{
20 = CONTENT
20 {
table = tx_comments_comments
select {
orderBy = tstamp DESC
pidInList = {$lib.page.comments.latest.pidInList}
where = deleted = 0 and hidden = 0 and approved = 1
max = {$lib.page.comments.latest.limit}
}
renderObj = COA
renderObj.wrap = <div class="comment">|</div>
renderObj{
5 = COA
5 {
10 = TEXT
10.field = firstname
10.required = 1
10.wrap = <span>|</span>
20 = TEXT
20.field = lastname
20.required = 1
20.wrap = <span>|</span>
stdWrap.typolink.parameter.field = email
stdWrap.typolink.ATagParams = class="commentemail"
}
20 = TEXT
20 {
field = content
wrap = <p>commentaire: |</p>
typolink.parameter = {$lib.page.comments.latest.detailPid}
typolink.additionalParams.dataWrap =
&tx_ttnews[tt_news]={field:external_ref}
typolink.useCacheHash = 1
}
30 = TEXT
30.field = external_ref
30.split {
token.char = 95
returnKey = 2
}
}
}
}
Daniel Huf wrote:
> I'm trying to get the latest comments from the folder where they are
> located.
>
> That for I wrote this TS... but I'm not able to create the typolink to
> link back to the news where the comment belongs... do you have an input.
>
> thanks
> Daniel
>
> CONSTANTS
>
> lib.page.comments.latest.limit = 10
> lib.page.comments.latest.pidInList = 73
>
> SETUP
>
> lib.page.comments.latest = COA
> lib.page.comments.latest.wrap = <div class="comments">|</div>
> lib.page.comments.latest{
>
> 20 = CONTENT
> 20 {
> table = tx_comments_comments
> select {
> orderBy = tstamp DESC
> pidInList = {$lib.page.comments.latest.pidInList}
> where = deleted = 0 and hidden = 0 and approved = 1
> max = {$lib.page.comments.latest.limit}
> }
>
> renderObj = COA
> renderObj.wrap = <div class="comment">|</div>
> renderObj{
> 5 = COA
> 5 {
> 10 = TEXT
> 10.field = firstname
> 10.required = 1
> 10.wrap = <span>|</span>
>
> 20 = TEXT
> 20.field = lastname
> 20.required = 1
> 20.wrap = <span>|</span>
> stdWrap.typolink.parameter.field = email
> stdWrap.typolink.ATagParams = class="commentemail"
>
> }
>
> 20 = TEXT
> 20 {
> field = content
> wrap = <p>commentaire: |</p>
> }
> 30 = TEXT
> 30.field = external_ref
> 30.split {
> token.char = 95
> returnKey = 2
> }
> }
> }
> }
More information about the TYPO3-english
mailing list