[TYPO3-english] How to exclude some pages in PIDinRootline?

Stefan Reichelt eichelt at web.de
Mon Nov 12 09:45:29 CET 2012


Hello Ugur,

I think there was a specific way to exclude PIDs, but I can't remember it..
Anyway, this might work:
--
yourobject{
     # Current page id as the value to check
     if.value.data = page:uid
     # List of page ids the above one will be checked against
     if.isInList = x,y
     # Negating the result, so if the page id is in the specified list, 
it returns false
     if.negate = 1
}
--
Not sure if the syntax/idea is completely valid though, you might need 
to do some testing there...
More about if [1].

Another way with conditions:
--
# The first = is always part of the condition, if no operator is given, 
equal is used. A comma means OR.
[PIDinRootline = x,y]
# PID is either X OR Y, do nothing
[ELSE]
# PID is not X AND not Y, do your thing here
[GLOBAL]
--

Some of the conditions (fe. hour) also allow != operator, but I'm not 
sure if PIDinRootline does. If it does,
the syntax would look like this (I think):
--
[PIDinRootline = != x] && [PIDinRootline = != y]
# do you thing
[GLOBAL]
--
Not sure if that might work at all though and it isn't really pretty 
anyway. More about Conditions [2].

Hope that could help you.

Kind regards
Stefan

[1] 
http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.7.0/view/1/5/#id553579
[2] 
http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.7.0/view/1/4/

On 12/11/2012 03:13, Ugur Kocak wrote:
> Hi again,
>
> I need to run some Typoscript code except certain pages. I mean I need to exclude some pages. Example code;
>
>> #Default Description:
>> page.meta{
>>    description.field = description
>> }
>> #Description if Default Description is empty:
>> page.meta.description.ifEmpty.stdWrap.cObject = CONTENT
>> page.meta.description.ifEmpty.stdWrap.cObject {
>>   table= tt_content
>>   select {
>>     selectFields = bodytext
>>   }
>>   renderObj =COA
>>   renderObj {
>>     10=TEXT
>>     10 {
>>       field = bodytext
>>       stripHtml=1
>>       crop = 1200 | ... | 1
>>     }
>>   }
>> }
>
> I know that I can run certain code on a specific page via
> [PIDinRootline = x,y]
> #put the TS here
> [end]
> But, I couldn't find any document explaining how to exclude certain pages (like pages for tt_news).
> Although globalVar permits usage of != operator, PIDinRootline doesn't I think. I tried that one but failed:
> [PIDinRootline != x,y]
>
> I will be happy if one gives me advice. Is there a way to exclude certain pages?
>
> I am sorry if I am asking dummy questions, but as you may expect :)
> Kind Regards,
> Ugur
>
>
>
>
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>



More information about the TYPO3-english mailing list