Some time ago a customer asked me if it was possible to have a sitemap on a developed application. Of course one could make a static sitemap and update it each time pages are added/changed but having a generic solution would make life so much easier.
This was again an excellent opportunity to make use of the apex dictionary views, seeing I consistently made use of the breadcrumbs, it just was a matter of getting the right query for the correct info. Once I have this info I could use the ApEx Tree option to represent it.
After some trial & error I came up with this:
SELECT breadcrumb_entry_id id,
decode(parent_breadcrumb_id ,
NULL,1,parent_breadcrumb_id )parent_id,
entry_label name
FROM APEX_APPLICATION_BC_ENTRIES
WHERE application_id = v(‘APP_ID’)
UNION
SELECT 0,
NULL,
NULL
FROM DUAL
Now I made a view on this query: v_sitemap
When you make the tree base it on your view and make sure you choose as root value the option static assignment with value 0.
All done and now you have a nice sitemap for your application.
Very cool!
Where do I find the table or view APEX_APPLICATION_BC_ENTRIES?We have apex 2.0 and 3.0.bob.wheldon@navteq.com
Hello Bob,For your Apex 2.2 installation, the view is located under the FLOWS_020200 user.For your 3.0 installation it is the FLOWS_030000 user.Kind reards,Olivier
Hi, somewhat unrelated, would you happen to know the api to delete a menu_option the opposite of create_menu_option?Regards,thanks,using Apex 3x
Managed to create the view OK and I get data in it, however my tree is always blank for some reason. Note sure why, I have used a static assignment for the root note of 0 so I can’t fathom out what I’m doing wrong.
Hey Anonymous,Do you have your application online somewhere so I can have a look?You can always email me details onolivier.dupont@iadvise.beOlivier
Hey Anonymous,Regarding the menu api, I do not immidialty know what it is but maybe you should have a look at the flows schema?Olivier