Forum Stats

  • 3,876,204 Users
  • 2,267,082 Discussions
  • 7,912,467 Comments

Discussions

Content Presenter showing contents of a WCC folder - pass the folderGUID from page URL?

GaganArneja
GaganArneja Member Posts: 33 Red Ribbon
edited Apr 12, 2018 1:32PM in WebCenter Portal

Hi Experts,

Working with Webcenter portal 12.2.1.1.0

I have a custom content presenter template that shows content under a folder in WCC.

I need a link that can pass the folder path/guid as a parameter to the page holding the content presenter, so when i click the link, it directly opens up the page that displays the contents of the folder.

Basically, instead of doing an EDIT on the content presenter and selecting the folder, I need a mechanism to pass that dynamically.

Is this possible. Any help much appreciated

TIA !

Best Answer

  • GaganArneja
    GaganArneja Member Posts: 33 Red Ribbon
    edited Mar 21, 2018 2:04AM Answer ✓

    I found the solution finally . Posting it here :

    Add a page parameter called datasource  with value: #{facesContext.externalContext.requestParameterMap['datasource']}

    In the content presenter parameter, datasource : #{bindings.datasource}

    In the URL, pass datasource=WebcenterContentPortal%23dCollectionID%<your folder id / guid here>

    And this works.

    I think the mistake i was making all along was to use param.datasource to tap into URL parameter - this does not work.

    Thank you for the help.

Answers

  • Dinil Mithra
    Dinil Mithra Member Posts: 351 Bronze Badge
    edited Mar 21, 2018 12:43AM

    Can you link content manager from your custom content presenter template? You can pass 'start folder path' as an input parameter to content Manager.

    Regards,

    DM

  • GaganArneja
    GaganArneja Member Posts: 33 Red Ribbon
    edited Mar 21, 2018 1:18AM

    Thank you for your reply.

    I should have added more detail.

    My content presenter template is for a picture gallery actually. So when i say "displays the contents of the folder" - It has some jquery on it to show the pictures one by one with a nice prev/next icon.

    When a new album is uploaded however, a link is added on the home page that says - "New Album, click here" - on click it must pass the folder guid to the content presenter template and open it up.

    So basically, I am using content presenter parameters now, and trying to pass the datasource like : #{'WebcenterContentPortal#dCollectionID:'.concat(param.FolderID)}

    I pass the FolderID in the URL, yet no success. I just need to be able to pass the datasource dynamically and I am sorted.

    (If I hard code the folder ID, it works fine - so the concept is ok)

    pastedImage_2.png

    Please let me know if you have anything on this. thanks ton

  • Dinil Mithra
    Dinil Mithra Member Posts: 351 Bronze Badge
    edited Mar 21, 2018 1:59AM

    How about creating a wrapper taskflow with pFolderID input parameter . Then use #{'WebcenterContentPortal#dCollectionID:'.concat(pageFlowScope.pFolderID)}.

    Regards,

    DM

  • GaganArneja
    GaganArneja Member Posts: 33 Red Ribbon
    edited Mar 21, 2018 2:01AM

    I have been wondering how to create wrapper taskflows in 12c since framework applications are not alive anymore.

  • GaganArneja
    GaganArneja Member Posts: 33 Red Ribbon
    edited Mar 21, 2018 2:04AM Answer ✓

    I found the solution finally . Posting it here :

    Add a page parameter called datasource  with value: #{facesContext.externalContext.requestParameterMap['datasource']}

    In the content presenter parameter, datasource : #{bindings.datasource}

    In the URL, pass datasource=WebcenterContentPortal%23dCollectionID%<your folder id / guid here>

    And this works.

    I think the mistake i was making all along was to use param.datasource to tap into URL parameter - this does not work.

    Thank you for the help.

  • Daniel Merchán
    Daniel Merchán Enterprise Achitect Member Posts: 2,192 Gold Trophy
    edited Mar 23, 2018 6:10AM

    Please, mark your thread as answered if you have found the solution.

    Kind regards.

  • User_QUFP4
    User_QUFP4 Member Posts: 176 Red Ribbon
    edited Apr 12, 2018 11:23AM

    Hi,

    I have almost similar requirement.. Trying to get a folder explorer with inthe oracle portal page.

    Created page parameter #{facesContext.externalContext.requestParameterMap['datasource']} and content presenter parameter #{bindings.datasource}.. trying to pass the datasource value in the URL..

    Still getting "No content items to display" even though there are few subfolders and documents in the folder.

    even hard coded Folder GUID is not working for me.

    #{WCAppContext.currentWebCenterURI}?datasource=WebcenterContentPortal%63EF0AD4FC032A205B5CC4FA78A4FCA7

    63EF0AD4FC032A205B5CC4FA78A4FCA7 is the folder GUID..  Something wrong with the URL? Please advise.

    Thanks!

  • User_QUFP4
    User_QUFP4 Member Posts: 176 Red Ribbon
    edited Apr 12, 2018 1:32PM

    Got it..! Thanks.. !

This discussion has been closed.