AutoSlot - public items


I’ve created a new velocity template / slot snippet using autoslotcontentfinder and use a jcr query to retrieve A to Z content items. This slot is used within a page template.

When I preview / publish the page and whatever permutation of sys_authtype or sys_itemfilter I use I get every revision of an item…not the current public one.

Any ideas?

Why are you including sys_authtype and sys_itemfilter in your JCR query? Can you paste your JCR query here?

… When I’m using sys_authtype this is manually changing the request URL to 101 in preview.

the sys_itemfilter=public is in the publication URL…visible in the publication log.

As I understand it, this should only show items in a public state.

The jcr:query is:
select rx:displaytitle,
rx:sys_title, rx:body,rx:sys_contentid,rx:sys_revision from rx:AZEntry where rx:displaytitle like :letter and jcr:path like :jcr_url


Try out your query using the Rhythmyx Query Debugger: [RX_SERVER_URL]/Rhythmyx/test/search.jsp. For some reason, if you drop the body (rx:body) from your query, you will get the results that you want. (fyi, you probably only need rx:sys_contentid, jcr:path in your select query in order for the autoslot content finder to work… the rest is extra information that the slot content finder shouldn’t need). So something like:

select rx:sys_contentid, jcr:path from rx:AZEntry where rx:displaytitle like :letter and jcr:path like :jcr_url

The only reason I’ve included jcr:path is that sometime in the past, we had a problem where it was pulling content ids when it shouldn’t have (the exact details escape me at the present). YMMV and you may not need to include it at all…

Ideally, you would only need to select the sys_contentid and sys_folderid in your jcr query.

Yup… my bad… i meant the sys_folderid. Thanks for the correction.

select rx:sys_contentid, rx:sys_folderid from rx:AZEntry where rx:displaytitle like :letter and jcr:path like :jcr_url

I would be curious if you could provide an explanation about why adding the body to the query causes the behavior reported…

Thanks for the pointers chaps…this got it down to just 2 of each content item.

I revisited the loop / code for the “raw slot” which I added to my template unchanged and it appears to do the slot item twice:

#initslot("" “”)
#if($sys.currentslot.relresults.size() > 0)
#foreach( $relresult in $sys.currentslot.relresults )

Commenting out either one of the emboldened lines above just renders one instance of the slot item. I’m not sure which is preferable to use but a result non the less.

Thanks again.