How to use cref links redirect to external content ?
2014-11-29 15:58
423 查看
1 Creat Iscript function,you can take advantage the follow code.
Declare Function SpecifyPortalOpen PeopleCode FUNCLIB_PTPP.PTPP_PORTALR FieldFormula; Function IScript_ContentRedirect() Local ApiObject &portal; Local ApiObject &cref; Local string &url = ""; Local string &portalName = %Request.GetParameter("PORTAL"); Local string &crefName = %Request.GetParameter("CREF"); &portal = SpecifyPortalOpen(&portalName); &cref = &portal.FindCREFByName(&crefName); If (&cref <> Null) Then If (&cref.Authorized) Then &url = &cref.AbsoluteContentURL; End-If; End-If; %Response.RedirectURL(&url); End-Function;
2 Create a new CREF for the iScript. In the additional parameters section of the CREF, addPORTAL=EMPLOYEE&CREF=YOUR_CREF_NAME
3 Create a CREF for your external URL
4Update the new iScript CREF's security to match the external content CREF's security.
相关文章推荐
- PictureEdit - How to display external images by providing links for them
- Netezza External Tables --How to use local files in external table
- How to use unity CreateExternalTexture on Android?
- iOS 5 Storyboard: How To use Segues, Scenes and Static Content UITableViews--Part III
- How to use virtual path providers to dynamically load and compile content from virtual paths in
- iOS 5 Storyboard: How To use Segues, Scenes and Static Content UITableViews--Part I
- iOS 5 Storyboard: How To use Segues, Scenes and Static Content UITableViews--Part II
- Siebel Symbolic URL: How to configure Displaying External Content Outside of an Applet
- iOS 5 Storyboard: How To use Segues, Scenes and Static Content UITableViews--Part II
- How to use an external dll file in VisualStudio project
- Siebel Symbolic URL: How to configure Displaying External Content Outside of an Applet
- iOS 5 Storyboard: How To use Segues, Scenes and Static Content UITableViews--Part III
- iOS 5 Storyboard: How To use Segues, Scenes and Static Content UITableViews--Part I
- How to use an external dll file in VisualStudio project
- How to use virtual path providers to dynamically load and compile content from virtual paths in
- Siebel Symbolic URL: How to configure Displaying External Content Inside of an Applet
- Siebel Symbolic URL: How to configure Displaying External Content Inside of an Applet
- (Page 1 of 3 )A walking tour of JavaBeans What JavaBeans is, how it works, and why you want to use it
- Linux - How to use LVM in Linux
- How to use epoll? A complete example in C