One of the greatest challenges to a successful Fluid deployment is Classic navigation and one of the most common solutions to this challenge is the Tile Wizard-based Navigation Collection. Tile Wizard-based navigation collections allow us to build business process-based navigation for our back-office users (back-office pages are primarily Classic). Let's say you have built some amazing Navigation Collections for your back-office users and now you want to drill from one collection or page to a specific target page in another Navigation Collection. You know you can easily craft a URL to a Tile Wizard Navigation Collection, but can you load a specific target component from that Navigation Collection? This is a great question that my PeopleTools Fluid course students ask me often. The answer is Yes!
When using the Tile Wizard to publish a Navigation Collection, PeopleTools uses a special Activity Guide template to display the Navigation Collection. This means that every Tile Wizard-based Navigation Collection is viewed as an Activity Guide. Each link is considered a step in the Activity Guide. Fluid Activity Guide steps have an id attribute called ptgpid. Once we find the ptgpid of a step, we can use that ID in a URL. When the Activity Guide is a Navigation Collection, the step ID is the Navigation Collection CREF Link ID. Note: this is not the base CREF ID, but the CREF link that was created by the Navigation Collection utility. If we inspect the HTML for a Navigation Collection, we can find the ptgpid in the HTML. Alternatively, we can find it in the portal registry under Portal Objects > Navigation Collections. Here is an example from the HTML:
To launch the highlighted item, copy the ptgpid and add the following to the end of the URL:
&ptgpid=<the id goes here>
For example, in the Portal Navigation Collection that is part of the PeopleSoft Developer homepage, appending the following to the URL will navigate directly to the Find Object Navigation item:
&ptgpid=HC_S201604180146095689166800
At jsmpros we believe that navigation is a critical component of a successful Fluid implementation, which is why we devote the first day of our Fluid 1 course to Fluid navigation. To learn more or to schedule a course, visit us online at jsmpros.com.
22 comments:
Thanks Jim! This is very handy especially when we are programmatically transferring users to specific pages within a Nav Collection. I am sure,there are many other use cases for this parameter!
In fact, I presented this tip during my 'Life Hacks' session at Collaborate this year!
@Sasank, I wish I had seen your presentation. That would have saved me hours of digging through PeopleCode! Unfortunately, as you know, we were scheduled to present at the same time.
As I dug through the code, it looked as though this should work with other Activity Guides, but that hasn't been my experience. As far as I can tell, other Fluid Activity Guides seem to remember the last page visited and load it instead of the ptgpid. Have you seen anything different?
This is useful, although i would prefer a much more robust parameter (like the Portal Object Name for instance, along with the Nav Collection) than this ptgpid.
If we modify Nav collections (I believe, removing a Content Reference and adding it back changes the ptgpid), there might be a problem with this hack.
Jim - Sorry for the late response. I missed the notification to your comment.
Yes, it was very unfortunate that we were scheduled at the same time. :(
Thankfully for me, I did not dig into all the PeopleCode. I randomly found this thread when I was looking for something else:
https://community.oracle.com/message/14358999
I had the same experience with Fluid Activity Guides where it does not work. I will post back to this thread if I find out more on this topic.
@Manoj, I haven't tested a change like that, but I agree, it would be nice to have the CREFID or something more consistent. I believe the behavior we are seeing is common to all Activity Guides. Navigation Collections just happen to be an implementation of a Fluid Activity Guide.
@Jim - About Fluid Activity Guide remembering the page. It must be the classic implementation of remembering 'Current Item'.
PS: I enhanced Activity guide for 8.55 when i was with Oracle.
I also found an issue with the Fluid Activity guide, the devs team seems to have forgotten to implement the equivalent of "Pagelet Preprocessing". I understand, there is no Pagelets in fluid, but they should have done something equivalent.
@Jim - "About Fluid Activity guides remembering the last page visited"
It must be the fluid implementation of "Current Active Item"
@Jim: "Navigation Collections just happen to be an implementation of a Fluid Activity Guide"
Nav Coll, Fluid Activity guides are implementations of Master Detail page? :)
That is correct. A navigation collection is an activity guide data type.
I wanted to stop back in and say thank you for this post! I was working on an issue with our custom Fluid BioDemo Activity Guide. When the users reached one component of the Activity Guide to add an emergency contact, the footer page would not display in SFF after the user added an emergency contact, and the footer page was the only way for the user to confirm the change and move forward. I was able to link directly back into the emergency contact Nav Coll item using the ptgpid and some wrangling of the URL to insert the CONTEXTIDPARAMS . Thanks again!
@Margaret, perfect! Thank you for letting us know how you applied this idea. Very cool!
Hi Jim
We found this blog very useful but it the ptgpid seems to have issues working in small form factor devices. Is there something we can do to correct this?
Regards
David
@David, I haven't tried small form factor. That surprises me. I'll test it out and let you know.
@David, I had to make some customizations recently because of how the pages work differently in with SFF. I'd be curious what pages/issues you are seeing.
How do I get the url to append the ptgpid-parameter in peoplecode?
generatecomponentcontenturl does not generate the correct url.
@eddy, great question. I had to look it up in the HTML, and then append it.
Jim,
In pt9.59 when we try a deep link like ...c/NUI_FRAMEWORK.PT_AGSTARTPAGE_NUI.GBL?cmd=login%26CONTEXTIDPARAMS=TEMPLATE_ID%3aPTPPNAVCOL%26scname=HUM_BSL_STUDENT_CENTER_NAV_FL%26PanelCollapsible=Y%26ptgpid=HUM_S202208121540563587688418
The %3a is rewritten as a :
Which causes the url not to work.
Any ideas?
Thanks,
Gary
Gary, how are you generating the "deep link"?
I know this is an older post, but has been helpful for my institution.
Has anyone taken this a step further and was able to carry over values into fields on the search page?
For example, I have a link that lands on a page (SSS_STUDENT_CENTER) within a navigation collection, but I would also like to carry over EMPLID onto the search page and even better, load the page to open the Student Center on a specific student.
Thanks in advance,
Krista
@Krista, standard PeopleTools processing allows you to pass search keys in the URL. The pattern is ?KEY_FIELD=VALUE. That might be enough to accomplish what you desire. If not, the next thing I would try is to pass values along in the URL, but use Event Mapping PeopleCode on the target to retrieve the parameters with %Request.GetParameter, and then move them into the appropriate location through my Event Mapping PeopleCode.
Hi Jim, Is there a repository of content reference parameters that we can refer to? Through your posts I've learned about lot of these parameters like &ptgpid, &ajaxtransfer etc. and thanks for that.
But I was wondering if there is any such list in the peoplebooks.
Great question! The answer is no.
Post a Comment