Jahia Dev Forum > Selecting a page...

0 (0 Good)
0 (0 Bad)

Selecting a page or a file as a content picket?

by  rvt »  2012/11/19 22:16

Hello,

I have been playing with this for a while, but couldn't find the right option..

I want to have a field where the user can select a page or a file (any file). I tried  - location (weakreference) but that just selects a page, not a file.

Is there a way to do this without creating two properties for my module?

 

  • Selecting a page or a file as a content picket?
    2012/11/19 22:16

    rvt <p> Hello,</p> <p> I have been playing with this for a while, but couldn&#39;t find the right option..</p> <p> I want to have a field where the user can select a page or a file (any file).&nbsp;I tried&nbsp;&nbsp;<strong>- location (weakreference)</strong> but that just selects a page, not a file.</p> <p> Is there a way to do this without creating two properties for my module?</p> <p> &nbsp;</p>

  • Number of messages  185
    Registration date Nov 19, 2012
    0 (0 Good)
    0 (0 Bad)

    Re: Selecting a page or a file as a content picket?

    by  shyrkov »  2012/11/27 20:40

    Hello Ries,

    sorry for the delay: last week we had an internal Jahia workshop, so everyone was stuck in the meetings/discussions/presentations :-)

    This can be achieved by specified the picker type for the reference field, e.g.:

    - link (weakreference, picker[type='editorial'])

    will use the Editorial content picker, which is defined by the Spring bean with ID: "editorialpicker".

     

    All the various pickers can be seen in the applicationcontext-contentpicker.xml file, located inside the jahia-impl JAR file, i.e.:

    WEB-INF\lib\jahia-impl-6.6.1.1.jar\org\jahia\defaults\config\spring\uicomponents\applicationcontext-contentpicker.xml

    If none of them suits your needs, it is quite easy to define your own picker (even from your custom module).

    The corresponding documentation is avilable in section "1.3.3   Use spring to create your own picker" of the "How-to use spring configurations to modify Jahia GWT Interfaces" document avilable in our Technical How-To site section.

     

    Kind regards

    Sergiy

    Sergiy Shyrkov (shyrkov)

    Number of messages  407
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page