Can a Granite Pathbrowser can have 2 or more RootPaths?

Avatar

Avatar
Give Back
Level 2
Hanshika_Shukla
Level 2

Likes

3 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Boost 3
Boost 1
View profile

Avatar
Give Back
Level 2
Hanshika_Shukla
Level 2

Likes

3 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Boost 3
Boost 1
View profile
Hanshika_Shukla
Level 2

20-02-2019

I have 2 questions:-

1. Can a path browser have 2 or more Rootpaths?

2. Can we use a Regex Expression to exclude a node in current rootpath

Scenario :-

I want

/content/abc

/content/dam/abc

as to appear in my rootpath navigator

But want to exclude or not show i:- /content/dam/abc/xyz

Thanks,

Hanshika

Replies

Avatar

Avatar
Boost 250
MVP
Gaurav-Behl
MVP

Likes

250 likes

Total Posts

1,147 posts

Correct reply

283 solutions
Top badges earned
Boost 250
Establish
Give back 300
Give Back 50
Give Back 5
View profile

Avatar
Boost 250
MVP
Gaurav-Behl
MVP

Likes

250 likes

Total Posts

1,147 posts

Correct reply

283 solutions
Top badges earned
Boost 250
Establish
Give back 300
Give Back 50
Give Back 5
View profile
Gaurav-Behl
MVP

21-02-2019

I doubt that can work OOB unless you plan to customize the implementation.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

21-02-2019

OOTB - this is not possible.

Avatar

Avatar
Give Back
Level 2
Hanshika_Shukla
Level 2

Likes

3 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Boost 3
Boost 1
View profile

Avatar
Give Back
Level 2
Hanshika_Shukla
Level 2

Likes

3 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Boost 3
Boost 1
View profile
Hanshika_Shukla
Level 2

21-02-2019

Do you know any blog that i can follow to achieve this especially-"But want to exclude or not show i:- /content/dam/abc/xyz"?

Avatar

Avatar
Give Back
Level 2
Hanshika_Shukla
Level 2

Likes

3 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Boost 3
Boost 1
View profile

Avatar
Give Back
Level 2
Hanshika_Shukla
Level 2

Likes

3 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Boost 3
Boost 1
View profile
Hanshika_Shukla
Level 2

21-02-2019

Do you know any blog that i can follow to achieve this especially-"But want to exclude or not show i:- /content/dam/abc/xyz"?

Avatar

Avatar
Boost 250
MVP
Gaurav-Behl
MVP

Likes

250 likes

Total Posts

1,147 posts

Correct reply

283 solutions
Top badges earned
Boost 250
Establish
Give back 300
Give Back 50
Give Back 5
View profile

Avatar
Boost 250
MVP
Gaurav-Behl
MVP

Likes

250 likes

Total Posts

1,147 posts

Correct reply

283 solutions
Top badges earned
Boost 250
Establish
Give back 300
Give Back 50
Give Back 5
View profile
Gaurav-Behl
MVP

22-02-2019

It's not possible to achieve without customization because "/libs/granite/ui/components/coral/foundation/form/pathfield" and "/libs/granite/ui/components/coral/foundation/form/pathbrowser" are granite:FinalArea

The easiest way is to use validations and force the user to select from options that you want and forcefully delete other selected options. The option to be excluded would still appear as a selection item and can't be hidden.

PathField — Granite UI 1.0 documentation

validationstring

multiple
The name of the validator to be applied. E.g. foundation.jcr.name. See validation in Granite UI.

forceSelectionboolean

Indicates if the user must only select from the list of given options. If it is not forced, the user can enter arbitrary value.

filterstring

  1. hierarchyNotFile
  2. folder
  3. hierarchy
  4. hierarchyNotFile
  5. nosystem

For Custom code, refer ---

You'd have to write similar code to exclude specific options at runtime