select * from tcontentfeeds
where siteID=
and Type=
and isPublic=1
and isactive=1
order by name
select * from tcontentfeeds
where siteID=
and isDefault=1
order by name
select * from (
select top #arguments.feedBean.getMaxItems()#
tcontent.siteid, tcontent.title, tcontent.menutitle, tcontent.restricted, tcontent.restrictgroups,
tcontent.type, tcontent.subType, tcontent.filename, tcontent.displaystart, tcontent.displaystop,
tcontent.remotesource, tcontent.remoteURL,tcontent.remotesourceURL, tcontent.keypoints,
tcontent.contentID, tcontent.contentHistID,tcontent.target, tcontent.targetParams,
tcontent.releaseDate, tcontent.lastupdate,tcontent.summary,
tfiles.fileSize,tfiles.fileExt,tcontent.fileid,
tcontent.tags,tcontent.credits,tcontent.audience, tcontent.orderNo,
tcontentstats.rating,tcontentstats.totalVotes,tcontentstats.downVotes,tcontentstats.upVotes,
tcontentstats.comments, tparent.type parentType, qKids.kids null as kids,
tcontent.path, tcontent.created, tcontent.nextn, tcontent.majorVersion, tcontent.minorVersion, tcontentstats.lockID, tcontent.expires
from tcontent
inner join #jointable# on (tcontent.contenthistid=#jointable#.contenthistid)
inner join #jointable# on (tcontent.contentid=#jointable#.contentid)
left Join tfiles on (tcontent.fileid=tfiles.fileid)
left Join tcontentstats on (tcontent.contentid=tcontentstats.contentid
and tcontent.siteid=tcontentstats.siteid)
Left Join tcontent tparent on (tcontent.parentid=tparent.contentid
and tcontent.siteid=tparent.siteid
and tparent.active=1)
left Join (select
#variables.classExtensionManager.getCastString(arguments.feedBean.getSortBy(),arguments.feedBean.getSiteID())# extendedSort
,tclassextenddata.baseID
from tclassextenddata inner join tclassextendattributes
on (tclassextenddata.attributeID=tclassextendattributes.attributeID)
where tclassextendattributes.siteid=
and tclassextendattributes.name=
) qExtendedSort
on (tcontent.contenthistid=qExtendedSort.baseID)
Left Join (select
tcontent.contentID,
Count(TKids.contentID) as kids
from tcontent
inner join #jointable# on (tcontent.contenthistid=#jointable#.contenthistid)
inner join #jointable# on (tcontent.contentid=#jointable#.contentid)
inner join tcontent TKids
on (tcontent.contentID=TKids.parentID
and tcontent.siteID=TKids.siteID)
Inner Join tcontenttags on (tcontent.contentHistID=tcontenttags.contentHistID)
where tcontent.siteid=
#renderActiveClause("tcontent",arguments.feedBean.getSiteID(),arguments.feedBean.getLiveOnly())#
#renderActiveClause("TKids",arguments.feedBean.getSiteID(),arguments.feedBean.getLiveOnly())#
AND TKids.searchExclude = 0
AND TKids.isNav = 1
AND tcontent.moduleid = '00000000000000000000000000000000000'
and (
(
or (
and (
)
#param.getRelationship()#
#param.getField()# #param.getCondition()# ()
tcontent.contentHistID IN (
select tclassextenddata.baseID from tclassextenddata
inner join tcontent on (tcontent.contentHistID=tclassextenddata.baseID and tcontent.active=1)
where tclassextenddata.attributeID=
inner join tclassextendattributes on (tclassextenddata.attributeID = tclassextendattributes.attributeID)
where tclassextendattributes.siteid=
and tclassextendattributes.name=
and #variables.classExtensionManager.getCastString(param.getField(),arguments.feedBean.getSiteID())#attributeValue #param.getCondition()# ())
)
AND tcontent.contentHistID in (
select distinct tcontentcategoryassign.contentHistID from tcontentcategoryassign
inner join tcontentcategories
ON (tcontentcategoryassign.categoryID=tcontentcategories.categoryID)
where (
tcontentcategories.path like
or
)
)
AND (
(
tcontent.isFeature = 1
OR
( tcontent.isFeature = 2
AND tcontent.FeatureStart <=
AND (tcontent.FeatureStop >= or tcontent.FeatureStop is null)
)
)
OR tcontent.contentHistID in (
select distinct tcontentcategoryassign.contentHistID from tcontentcategoryassign
inner join tcontentcategories
ON (tcontentcategoryassign.categoryID=tcontentcategories.categoryID)
where (
tcontentcategories.path like
or
)
AND
(
tcontentcategoryassign.isFeature = 1
OR
( tcontentcategoryassign.isFeature = 2
AND tcontentcategoryassign.FeatureStart <=
AND (tcontentcategoryassign.FeatureStop >= or tcontentcategoryassign.FeatureStop is null)
)
)
and tcontentcategoryassign.siteID=)
)
and (
tcontent.parentid= or
)
AND
(
tcontent.Display = 1
OR
(
tcontent.Display = 2
AND
(
(
tcontent.DisplayStart <=
AND (tcontent.DisplayStop >= or tcontent.DisplayStop is null)
)
OR
tcontent.parentID in (select contentID from tcontent
where type='Calendar'
#renderActiveClause("tcontent",arguments.feedBean.getSiteID())#
and siteid=
)
)
)
)
AND
(
TKids.Display = 1
OR
(
TKids.Display = 2
AND
(
(
TKids.DisplayStart <=
AND (TKids.DisplayStop >= or TKids.DisplayStop is null)
)
OR
TKids.parentID in (select contentID from tcontent
where type='Calendar'
#renderActiveClause("tcontent",arguments.feedBean.getSiteID())#
and siteid=
)
)
)
)
group by tcontent.contentID
) qKids
on (tcontent.contentID=qKids.contentID)
where
tcontent.siteid =
#renderActiveClause("tcontent",arguments.feedBean.getSiteID(),arguments.feedBean.getLiveOnly())#
AND tcontent.isNav = 1
AND tcontent.moduleid = '00000000000000000000000000000000003'
AND tcontent.moduleid = '00000000000000000000000000000000000'
AND tcontent.searchExclude = 0
AND tcontent.type !='Module'
and (
(
or (
and (
)
#param.getRelationship()#
#param.getField()# #param.getCondition()# ()
tcontent.contentHistID IN (
select tclassextenddata.baseID from tclassextenddata
inner join tcontent on (tcontent.contentHistID=tclassextenddata.baseID and tcontent.active=1)
where tclassextenddata.attributeID=
inner join tclassextendattributes on (tclassextenddata.attributeID = tclassextendattributes.attributeID)
where tclassextendattributes.siteid=
and tclassextendattributes.name=
and #variables.classExtensionManager.getCastString(param.getField(),arguments.feedBean.getSiteID())#attributeValue #param.getCondition()# ())
)
and tcontenttags.tag=
AND tcontent.contenthistID in (
select distinct tcontentcategoryassign.contentHistID from tcontentcategoryassign
inner join tcontentcategories
ON (tcontentcategoryassign.categoryID=tcontentcategories.categoryID)
where (
tcontentcategories.path like
or
)
)
AND (
(
tcontent.isFeature = 1
OR
( tcontent.isFeature = 2
AND tcontent.FeatureStart <=
AND (tcontent.FeatureStop >= or tcontent.FeatureStop is null)
)
)
OR tcontent.contenthistID in (
select distinct tcontentcategoryassign.contentHistID from tcontentcategoryassign
inner join tcontentcategories
ON (tcontentcategoryassign.categoryID=tcontentcategories.categoryID)
where (
tcontentcategories.path like
or
)
AND
(
tcontentcategoryassign.isFeature = 1
OR
( tcontentcategoryassign.isFeature = 2
AND tcontentcategoryassign.FeatureStart <=
AND (tcontentcategoryassign.FeatureStop >= or tcontentcategoryassign.FeatureStop is null)
)
)
and tcontentcategoryassign.siteID=
)
)
and tcontent.parentid in (
,
'')
AND
(
tcontent.Display = 1
OR
(
tcontent.Display = 2
AND
(
(
tcontent.DisplayStart <=
AND (tcontent.DisplayStop >= or tcontent.DisplayStop is null)
)
OR tparent.type='Calendar'
)
)
)
and (tcontent.mobileExclude is null
OR
tcontent.mobileExclude in (0,2)
tcontent.mobileExclude in (0,1)
)
order by
tcontent.#arguments.feedBean.getSortBy()# #arguments.feedBean.getSortDirection()#
lower(tcontent.#arguments.feedBean.getSortBy()#) #arguments.feedBean.getSortDirection()#
tcontentstats.rating #arguments.feedBean.getSortDirection()#, tcontentstats.totalVotes #arguments.feedBean.getSortDirection()#
tcontentstats.comments #arguments.feedBean.getSortDirection()#
rand()
newID()
dbms_random.value
qExtendedSort.extendedSort #arguments.feedBean.getSortDirection()#
tcontent.releaseDate desc,tcontent.lastUpdate desc,tcontent.menutitle
limit
) where ROWNUM <=
select contentID, menutitle, type from tcontent where
active=1 and
(
contentID=
or
)
AND siteID=
0=1
SELECT name, channelLink, type
FROM tcontentfeeds
where feedID in
(select feedID from tcontentfeeditems where itemID
in (select categoryID from tcontentcategories where siteid=)
=
and type = 'categoryID')
and siteID =
select count(*) as Total from tcontentfeeds
where isactive=1
and siteid=
and type=
and (
(#arguments.table#.active = 1
and #arguments.table#.Approved = 1
and #arguments.table#.contentID not in (#previewData.contentIDList#)
)
or
(
#arguments.table#.contentHistID in (#previewData.contentHistIDList#)
)
)
and #arguments.table#.active = 1
and #arguments.table#.Approved = 1
and #arguments.table#.active = 1
and #arguments.table#.Approved = 1