I would like to have a list of every slot associated to content item.
Thank you in advance.
What’s that? Screenshot?
Hi Yannik,
In what context?
If through SQL:
REL.DEPENDENT\_ID AS SLOT\_ITEM\_CONTENTID,
CS.TITLE AS SLOT\_ITEM\_NAME,
CT.CONTENTTYPENAME AS SLOT\_ITEM\_CONTENTTYPE\_NAME
FROM
PSX\_OBJECTRELATIONSHIP REL,
RXSLOTTYPE SL,
CONTENTSTATUS CS,
CONTENTTYPES CT
WHERE
SL.SLOTID = REL.SLOT\_ID
AND REL.DEPENDENT\_ID = CS.CONTENTID
AND CS.CONTENTTYPEID = CT.CONTENTTYPEID
AND REL.OWNER\_REVISION = CS.CURRENTREVISION
AND REL.SLOT\_ID IS NOT NULL
AND REL.OWNER\_ID = '#####' -- Change ##### to Content ID Number
ORDER BY SL.SLOTID
Sorry for the delay of my answer.
My question is:
how to retrieve the contents of all the slot of a content item with a loop in the template page?
The following code snippet will allow you to get the contents of a slot (replace “NAME OF THE SLOT” with your slot name), and will render the item using it’s default snippet template.
#initslot("NAME OF THE SLOT")##
#if($sys.currentslot.relresults.size() \> 0)## #foreach( $relresultin $sys.currentslot.relresults)##
#slotItem($relresult)##
#end##
#end##
#endslot("NAME OF THE SLOT")##