[TYPO3-english] ID page with special doktype
JoH asenau
info at cybercraft.de
Wed May 22 20:32:24 CEST 2013
Am 22.05.2013 14:34, schrieb Vasyl Mosijchuk:
> Yes, I konw .... but not work
>
> IdPageDokType254 = CONTENT
> IdPageDokType25 {
> table = pages
> select {
> andWhere = deleted=0 AND hidden=0 AND doktype=254
> max = 1
> }
> renderObj = TEXT
> renderObj.field = uid
> }
>
> ...on frontend empty. ID page does not display
Besides the missing 4 in your code, you want to have a look at the
manual for the cObject CONTENT and its function "select":
http://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Select/Index.html
As you can see, select makes use of pidInList, which uses "this" as a
default.
So the parent page of all the pages you could get with your CONTENT
object always would be the page you are currently on.
You should set pidInList = 123 with 123 being the ID of you rootpage and
then add the recursive parameter as well, to get more levels of subpages.
select {
pidInList = 123
recursive = 5
andWhere = deleted=0 AND hidden=0 AND doktype=254
}
This way you will get each page with doktype 254.
But I guess this will still be the wrong approach, since you actually
want to get exactly one unique page and not the pages with doktype 254?
HTH
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
More information about the TYPO3-english
mailing list