Link Picker Custom Plugins

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Link Picker Custom Plugins

Tuno
Hi All,

I would like to reuse the link picker functionality with a custom plugin.
As I understand the dialog is divided in three parts:
1. tree (accordion tabs with tree parts)
2. navigation (breadcrumb)
3. list-detail (document browser)

What I would like to do is introduce extra tab in the tree part and when I click on it I get an no tree part under it, no navigation and a custom plugin that shows list of documents in the list-detail part.
In other words:
1. extra tab in the accordion with no tree
2. no navigation for that tab
3. custom list-detail plugin showing list of documents
I pick for every part different plugin. In first to cases no plugin. Only for the third part.
How can I configure this in /hippo:configuration/hippo:frontend/cms/cms-pickers/documents/navigator?

When the I click on other tabs like documents and images it should change back to default functionality.

Kind Regards,

Tuno
Reply | Threaded
Open this post in threaded view
|

Re: Link Picker Custom Plugins

Frank van Lankvelt
On Wed, Feb 15, 2012 at 9:58 AM, Tuno <[hidden email]> wrote:

> Hi All,
>
> I would like to reuse the link picker functionality with a custom plugin.
> As I understand the dialog is divided in three parts:
> 1. tree (accordion tabs with tree parts)
> 2. navigation (breadcrumb)
> 3. list-detail (document browser)
>
> What I would like to do is introduce extra tab in the tree part and when I
> click on it I get an no tree part under it, no navigation and a custom
> plugin that shows list of documents in the list-detail part.
> In other words:
> 1. extra tab in the accordion with no tree
> 2. no navigation for that tab
> 3. custom list-detail plugin showing list of documents
> I pick for every part different plugin. In first to cases no plugin. Only
> for the third part.
> How can I configure this in
> /hippo:configuration/hippo:frontend/cms/cms-pickers/documents/navigator?
>
interesting case.  This should be possible with a custom
IBrowserSection implementation.  You could take a look at the existing
implementations to see how this works.

The Navigator has a list of these sections; add your section to the
'sections' list and adding a property with a unique service name.  A
renderplugin with the same value for it's wicket.id will be rendered
as a section.  It does need to implement the IBrowserSection interface
to participate in the section switching and the synchronization with
the document listing.

The list of documents that is either of the type 'folder' or of type
'search result'.  The views for these are instantiated when the
documentcollection changes it's type, selected folder or search
result.

Note that this functionality is not yet part of the API; as you can
see, it's a bit clumsy and not particularly friendly to implement.
Beware that it might change in the future.

hope this helps,
cheers, Frank

> When the I click on other tabs like documents and images it should change
> back to default functionality.
>
> Kind Regards,
>
> Tuno
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Link-Picker-Custom-Plugins-tp7286948p7286948.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Link Picker Custom Plugins

Tuno
Hi Frank,

After some debugging through the Hippo source I found out that the way you've described is the way to do it. It is indeed different than I imagined it would work having seen the configuration for the first time.

I did implement my own section that will search for some documents when you click on the tab. It executes a custom query for retrieving the documents on tab activation. It will show me the documents in the 'search' view.

The problem now is that when I click on one of the documents to select it, it switches back to the 'folder' view in the 'Document' tab and to the path of where the document exists. It will select the document, but it is not clear if the folder contains multiple documents and selected document is on other page. I didn't expect this. It should stay in the same tab and select the document only.

In my custom tab it also breaks the paging functionality.

Any ideas would be welcome.

Kind Regards,

Tuno
Reply | Threaded
Open this post in threaded view
|

Re: Link Picker Custom Plugins

Frank van Lankvelt
On Fri, Feb 17, 2012 at 8:31 AM, Tuno <[hidden email]> wrote:

> Hi Frank,
>
> After some debugging through the Hippo source I found out that the way
> you've described is the way to do it. It is indeed different than I imagined
> it would work having seen the configuration for the first time.
>
> I did implement my own section that will search for some documents when you
> click on the tab. It executes a custom query for retrieving the documents on
> tab activation. It will show me the documents in the 'search' view.
>
> The problem now is that when I click on one of the documents to select it,
> it switches back to the 'folder' view in the 'Document' tab and to the path
> of where the document exists. It will select the document, but it is not
> clear if the folder contains multiple documents and selected document is on
> other page. I didn't expect this. It should stay in the same tab and select
> the document only.
>
the problem is probably that the regular content section also still
contains the document.

Perhaps this behavior could be improved in the BrowseService; there
the IBrowserSection#contains() method is used to find the correct
section to open when a document is selected.  If it would check the
active section before the others, I think the behavior would already
be better.

cheers, Frank


> In my custom tab it also breaks the paging functionality.
>
> Any ideas would be welcome.
>
> Kind Regards,
>
> Tuno
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Link-Picker-Custom-Plugins-tp7286948p7293445.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Link Picker Custom Plugins

Tuno
Hi Frank,

Thanks for the help. That is what we did now. We forked the navigator to use the forked service and do the check suggested.

Kind Regards,

Tuno
Reply | Threaded
Open this post in threaded view
|

Re: Link Picker Custom Plugins

Frank van Lankvelt
if you can post a patch, I'll put it in; this behavior seems better
than what it was.

cheers, Frank


On Tue, Feb 21, 2012 at 3:13 PM, Tuno <[hidden email]> wrote:

> Hi Frank,
>
> Thanks for the help. That is what we did now. We forked the navigator to use
> the forked service and do the check suggested.
>
> Kind Regards,
>
> Tuno
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Link-Picker-Custom-Plugins-tp7286948p7304811.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Link Picker Custom Plugins

Tuno
Hi Frank,

We are working on "My Recent Documents" plugin for the link picker.
See also this post http://hippo.2275632.n2.nabble.com/My-20-last-edited-documents-from-within-the-linkpicker-td6428376.html

This piece of code is part of the whole. I will sent you the whole patch for the "My Recent Documents" to integrate into Hippo if desired as a donation at the end of our sprint. This will contain that part you requested too.

I will get back to you.

Kind Regards,

Tuno
Reply | Threaded
Open this post in threaded view
|

Re: Link Picker Custom Plugins

Frank van Lankvelt
On Wed, Feb 22, 2012 at 12:54 PM, Tuno <[hidden email]> wrote:

> Hi Frank,
>
> We are working on "My Recent Documents" plugin for the link picker.
> See also this post
> http://hippo.2275632.n2.nabble.com/My-20-last-edited-documents-from-within-the-linkpicker-td6428376.html
>
> This piece of code is part of the whole. I will sent you the whole patch for
> the "My Recent Documents" to integrate into Hippo if desired as a donation
> at the end of our sprint. This will contain that part you requested too.
>
looking forward to this!  That should speed up link creation significantly.

If it could be broken down in functional increments, that would be
easiest to review/accept.

thanks, Frank

> I will get back to you.
>
> Kind Regards,
>
> Tuno
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Link-Picker-Custom-Plugins-tp7286948p7308069.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Link Picker Custom Plugins

Frank van Lankvelt
Denis sent me the patch over a different channel, I've applied it as a part of
https://issues.onehippo.com/browse/CMS7-5904 .  Will be available in
new 7.6 and 7.7 cms tags.

Thanks for the contribution!


On Wed, Feb 22, 2012 at 5:15 PM, Frank van Lankvelt
<[hidden email]> wrote:

> On Wed, Feb 22, 2012 at 12:54 PM, Tuno <[hidden email]> wrote:
>> Hi Frank,
>>
>> We are working on "My Recent Documents" plugin for the link picker.
>> See also this post
>> http://hippo.2275632.n2.nabble.com/My-20-last-edited-documents-from-within-the-linkpicker-td6428376.html
>>
>> This piece of code is part of the whole. I will sent you the whole patch for
>> the "My Recent Documents" to integrate into Hippo if desired as a donation
>> at the end of our sprint. This will contain that part you requested too.
>>
> looking forward to this!  That should speed up link creation significantly.
>
> If it could be broken down in functional increments, that would be
> easiest to review/accept.
>
> thanks, Frank
>
>> I will get back to you.
>>
>> Kind Regards,
>>
>> Tuno
>>
>> --
>> View this message in context: http://hippo.2275632.n2.nabble.com/Link-Picker-Custom-Plugins-tp7286948p7308069.html
>> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/forums.html
>
>
>
> --
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> Boston - 1 Broadway, Cambridge, MA 02142
>
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Link Picker Custom Plugins

Gerrit Berkouwer
Nice addition Denis! ;-)

Gerrit



Op 29 feb. 2012 om 17:37 heeft Frank van Lankvelt <[hidden email]> het volgende geschreven:

> Denis sent me the patch over a different channel, I've applied it as a part of
> https://issues.onehippo.com/browse/CMS7-5904 .  Will be available in
> new 7.6 and 7.7 cms tags.
>
> Thanks for the contribution!
>
>
> On Wed, Feb 22, 2012 at 5:15 PM, Frank van Lankvelt
> <[hidden email]> wrote:
>> On Wed, Feb 22, 2012 at 12:54 PM, Tuno <[hidden email]> wrote:
>>> Hi Frank,
>>>
>>> We are working on "My Recent Documents" plugin for the link picker.
>>> See also this post
>>> http://hippo.2275632.n2.nabble.com/My-20-last-edited-documents-from-within-the-linkpicker-td6428376.html
>>>
>>> This piece of code is part of the whole. I will sent you the whole patch for
>>> the "My Recent Documents" to integrate into Hippo if desired as a donation
>>> at the end of our sprint. This will contain that part you requested too.
>>>
>> looking forward to this!  That should speed up link creation significantly.
>>
>> If it could be broken down in functional increments, that would be
>> easiest to review/accept.
>>
>> thanks, Frank
>>
>>> I will get back to you.
>>>
>>> Kind Regards,
>>>
>>> Tuno
>>>
>>> --
>>> View this message in context: http://hippo.2275632.n2.nabble.com/Link-Picker-Custom-Plugins-tp7286948p7308069.html
>>> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Hippo-cms7-user mailing list and forums
>>> http://www.onehippo.org/cms7/support/forums.html
>>
>>
>>
>> --
>> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
>> Boston - 1 Broadway, Cambridge, MA 02142
>>
>> US +1 877 414 4776 (toll free)
>> Europe +31(0)20 522 4466
>> www.onehippo.com
>
>
>
> --
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> Boston - 1 Broadway, Cambridge, MA 02142
>
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
--
Greetz, Gerrit