This content has been marked as final. Show 9 replies
If you are running a custom portlet using PLSQL, you can take it from p_portlet_record.page_url where
p_portlet_record is one element of this type
type portlet_runtime_record is record (
,reference_path varchar2(100) -- NOTE!!! verify this
If you are running other kind of portlet, i don't know how, but i'd like to know that too
This does not work in 10.1.4 since page_url no longer contains page_id, all URLs that i get are friendly urls.
already spent 2 days trying to find a simple answer for this be it a function call or whatever. This is getting very annoying since this is quite a simple thing - knowing the current page.
From 10.1.4 the page url has changed and you now get the full page path. You'll need to filter that part out including the / at the beginning
For example let's say that your url looks like this:
The acutal page path is then /pgr1/page1/page2
There is a procedure inside the portal schema that you can use, but the only downside is that it has alot of out parameters. The following example procedure, uses it to filter out the pagegroup and pageid based on the page path you pass through.
(prp_page_path IN VARCHAR2, prp_pg_id OUT NUMBER, prp_pa_id OUT NUMBER) IS
portal.wwpob_api_path.translate_path(prp_page_path, lv_names, lv_values,
lv_url_format, lv_siteid, lv_pageid, lv_tabid,
lv_selected_tabs, lv_thingid, lv_thing_siteid,
prp_pg_id := lv_siteid;
prp_pa_id := lv_pageid;
Don't know how supported this method is, but at least it does the job we want it to do and since it's from Oracle itself it ought to be more or less correct.
Hope this helps
Did you write this procedure yourself? If not, where is it located in the PORTAL schema?
Also, can you provide a simple way to return the page path? I see that it needs to be passed into the procedure, but I am not sure how to get it.
if someone gets a solution, plz let me know. I need the page id on the page using PL/SQL or any of the API in Portal 10.1.2 release 2.
This will be a major breakthrough for me. Plz help.
If you use it in header try it like:
l_path_begin := instr(owa_util.get_cgi_env('PATH_INFO'), '/', 1, 2);
l_server_name := owa_util.get_cgi_env('SERVER_NAME');
l_page_url := 'http://' || l_server_name || substr(owa_util.get_cgi_env('PATH_INFO'), l_path_begin);
l_page_id := mpl_general_func.get_page_id(l_page_url);
u can test all variables u get if u use:
I have used it in pl/sql area, but it worked only at beginning of a page.
As part of your solution you are using mpl_general_func.
Where/what is this package?
its only a function which converts url to pageid.
use table: wwsbr_all_folders and make a recursive call
Could you please explain this a bit further? I am still not quite understanding what I should be doing with the mpl_general_func function. Is this a function that you wrote to search through the wwsbr_all_folders table using the URL you generated?
From what I can tell, the wwsbr_all_folders only stores urls for pages that require them (such as redirect pages). In other words, there is not a url stored in this table for every portal page, so I cannot take a URL and use it to search the wwsbr_all_folders table and pull page id.
Message was edited by: