1) Run the below SQL to get the content reference name for your component
SELECT PORTAL_NAME,
PORTAL_OBJNAME AS CONTENT_REFERENCE,
PORTAL_LABEL,
PORTAL_URI_SEG1 AS MENU,
PORTAL_URI_SEG2 AS COMPONENT,
PORTAL_URI_SEG3 AS MARKET
FROM psprsmdefn
WHERE PORTAL_NAME = 'EMPLOYEE'
AND PORTAL_URI_SEG2 = :1;
-- Replace :1 with the component name you are looking for.
2) From the query above - copy the value in the CONTENT_REFERENCE field and replace the ":1" variable and you will have the path to your component.
WITH portal_registry AS
(SELECT RTRIM(REVERSE(sys_connect_by_ path(REVERSE(portal_label), ' >> ')), ' >> ') path,
LEVEL lvl
FROM psprsmdefn
WHERE portal_name = 'EMPLOYEE' START WITH PORTAL_OBJNAME = :1 CONNECT BY PRIOR portal_prntobjname =portal_objname)
SELECT path
FROM portal_registry
WHERE lvl =
(SELECT MAX(lvl)
FROM portal_registry);
So, the 1st query is to get the content reference for a component name that you know and then using Jim's query to find the path!
==================
==================
==================
==================
==================
Another SQL:
SELECT DISTINCTPage = PNL.PNLNAME,
Component = P1.PORTAL_URI_SEG2,
Record = FLD.RECNAME,
Navigation = ISNULL(P6.PORTAL_LABEL, '') + ' > ' + ISNULL(P5.PORTAL_LABEL, '')
+ ' > ' + ISNULL(P4.PORTAL_LABEL, '') + ' > ' + ISNULL(P3.PORTAL_LABEL, '')
+ ' > ' + ISNULL(P2.PORTAL_LABEL, '') + ' > ' + ISNULL(P1.PORTAL_LABEL, 'Nav not found')
FROM PSPNLGROUP PNL LEFT JOIN PSPNLFIELD FLD ON PNL.PNLNAME = FLD.PNLNAME
LEFT JOIN PSPRSMDEFN P1 ON PNL.PNLGRPNAME = P1.PORTAL_URI_SEG2
LEFT JOIN PSPRSMDEFN P2 ON P1.PORTAL_PRNTOBJNAME = P2.PORTAL_OBJNAME AND (P1.PORTAL_NAME = P2.PORTAL_NAME OR P1.PORTAL_NAME IS NULL)
LEFT JOIN PSPRSMDEFN P3 ON P2.PORTAL_PRNTOBJNAME = P3.PORTAL_OBJNAME AND (P2.PORTAL_NAME = P3.PORTAL_NAME OR P2.PORTAL_NAME IS NULL)
LEFT JOIN PSPRSMDEFN P4 ON P3.PORTAL_PRNTOBJNAME = P4.PORTAL_OBJNAME AND (P3.PORTAL_NAME = P4.PORTAL_NAME OR P3.PORTAL_NAME IS NULL)
LEFT JOIN PSPRSMDEFN P5 ON P4.PORTAL_PRNTOBJNAME = P5.PORTAL_OBJNAME AND (P4.PORTAL_NAME = P5.PORTAL_NAME OR P4.PORTAL_NAME IS NULL)
LEFT JOIN PSPRSMDEFN P6 ON P5.PORTAL_PRNTOBJNAME = P6.PORTAL_OBJNAME AND (P5.PORTAL_NAME = P6.PORTAL_NAME OR P5.PORTAL_NAME IS NULL)
WHERE
--P1.PORTAL_URI_SEG2 = 'JOB_DATA'
FLD.RECNAME IN (
)
The view PSTREEMGRNAV_VW also stores similar information which can be pulled easily.
ReplyDelete