Restricting link picker in a doctype to certain folders

82 views
Skip to first unread message

Piyush Mohan

unread,
Mar 29, 2016, 4:14:36 PM3/29/16
to Hippo Community
Hello,

I have a document type in a namespace, which is used inside two channels. That document type has a link(picker) field, which I would like to restrict to a certain folder(one in each channel). Is it possible to do so? If so, directions will be appreciated.


Thx,
Pi

William Borg Barthet

unread,
Mar 30, 2016, 3:16:18 AM3/30/16
to hippo-c...@googlegroups.com
Hi Pi,

I think what you want is not going to be possible.

You can configure the link picker [1] by specifying the UUID or the absolute path. For what you want to work, you'd need to be able to specify a relative path. You can, at least, restrict the picker to the correct document type.

I think I'll create an issue for this improvement.

thanks!

William

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.



--

William Borg Barthet
SOLUTION ARCHITECT / TRAINER
 w.borgbarthet@onehippo.com
+49 160 360 5648

Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 71 Summer Street, Boston, MA 02110

DE +49 170 4074731
NL +31 20 522 44 66
US +1 877 414 47 76 (toll free)
www.onehippo.com
www.onehippo.org

Philip

unread,
Nov 28, 2017, 8:19:10 AM11/28/17
to Hippo Community
Hi William,

we have the same problem, is there any new solution to restrict the link picker to folders in each channel?

thanks,
Philip
 w.borgbarthet...@onehippo.com

Jasper Floor

unread,
Nov 28, 2017, 8:42:04 AM11/28/17
to Hippo Community
What you can do is override the LinkPickerPlugin. This may be a bit complicated and is not something you should do without a good understanding of the cms and Wicket, but is not essentially difficult. It wil lof course introduce a maintenance burden and it may not work across new versions. 

mvg,
Jasper


--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-community@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.

Minos Chatzidakis

unread,
Nov 29, 2017, 4:48:42 AM11/29/17
to Hippo Community
As Jasper said, you can override the LinkPickerPlugin and change the configuration. I would override the constructor, call super and after that I would modify the config object: config.put("base.uuid", YOUR_UUID);

The challenge I see is that your link picker will need to be aware of the HST channels and their root folders in the content (which is HST information, ideally non accessible from wicket components). I expect you'll either need a mapping somewhere (channel <-> root folder), or read the HST configuration or mark the folders that are roots of channels with some mixin (non recommended, I would keep the content as unaware of this as possible).

The picker by default also remembers the last visited folder, which can be a problem in your case. You'll need to either manipulate that (in the config again) or disable the feature "last.visited.enabled", see https://www.onehippo.org/library/concepts/document-types/configure-the-linkpicker-to-select-folders-or-filter-on-document-type.html

hth!
Minos
--
--



Minos Chatzidakis

Product consultant

email-sig-logo.png

p.

e.

+31 20 522 44 66 

_________________________________________________________________________________
Reply all
Reply to author
Forward
0 new messages