ReStructured Text InfrastructureTYPO3 CMS - What's Newwiki.typo3.orgTYPO3 CMS Documentation

Feature #57171

select: Enable queries using "root" and "-1" for pidInList

Added by Oliver Hader over 1 year ago. Updated over 1 year ago.

Status:Resolved Start date:2014-03-22
Priority:Should have Due date:
Assigned To:Chris topher % Done:

100%

Category:-
Target version:6.2

Description

The change refers to http://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Select/Index.html

select.pidInList now supports the new values "root" and "-1".

Add to documentation

Since TYPO3 CMS 6.2 it is possible to select records from the root-page level, like from the table "sys_category". For this case, it is required that "root" is set.
Besides that, version records can be selected directly by setting the value to "-1", this allows to directly select workspace versioned records.

Special keyword: "this" is replaced with the id of the current page, "root" is replaced with the root-page level (records with pid=0)

Example:

// Fetching related sys_category records
// stored in the MM intermediate table
10 = CONTENT
10 {
    table = sys_category
    select {
        pidInList = root,-1
        selectFields = sys_category.*
        join = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid
        where.data = field:_ORIG_uid // field:uid
        where.intval = 1
        where.wrap = sys_category_record_mm.uid_foreign=|
        orderBy = sys_category_record_mm.sorting_foreign
        languageField = sys_category.sys_language_uid
    }
}

See #57168


Related issues

related to Core - Task #57168: Enable queries using "root" and "-1" for pidInList Resolved 2014-03-21

Associated revisions

Revision b246b59b
Added by Chris topher over 1 year ago

[TASK] select: Enable queries using "root" and "-1" for pidInList

Property select.pidInList of the select function now supports the new
values "root" and "-1". Document them!

Change-Id: I923b381ac0ea7a75d806c1f532f4b994b86e08fc
Resolves: #57171
Reviewed-on: https://review.typo3.org/28752
Reviewed-by: Chris topher
Tested-by: Chris topher

History

#1 Updated by Oliver Hader over 1 year ago

The feature got merged in between.

#2 Updated by Chris topher over 1 year ago

  • Assigned To set to Chris topher

#3 Updated by Chris topher over 1 year ago

  • Subject changed from Enable queries using "root" and "-1" for pidInList to select: Enable queries using "root" and "-1" for pidInList

#4 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Documentation/TYPO3/Reference/Typoscript has been pushed to the review server.
It is available at https://review.typo3.org/28752

#5 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master of project Documentation/TYPO3/Reference/Typoscript has been pushed to the review server.
It is available at https://review.typo3.org/28752

#6 Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch master of project Documentation/TYPO3/Reference/Typoscript has been pushed to the review server.
It is available at https://review.typo3.org/28752

#7 Updated by Chris topher over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF