Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

Commit

Permalink
Merge pull request #90 from enonic/issue-86
Browse files Browse the repository at this point in the history
Document support of wildcards in allowContentType config of ContentSe…
  • Loading branch information
alansemenov committed May 15, 2018
2 parents d94512c + 5e46b3d commit 7b64342
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion doc/developer/schema/input-types/content-selector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ relationship
This setting defines the name of which relationship-type to use. Default is system:reference.

allowContentType
This is used to limit the content types that may be selected for this input. If you only specify content type name - `citation` - the current app is automatically presumed. You can add another app's name - `my.other.app` - followed by a colon (:) and the content type name `:quote` to allow content from other apps, like so: `my.other.app:quote`. Use one setting for each content-type.
This is used to limit the content types that may be selected for this input using following rules:

* If you only specify content type name - `citation` - the current app is automatically presumed. Use one setting for each content-type.
* You can add another app's name - `my.other.app` - followed by a colon (:) and the content type name `:quote` to allow content from other apps, like so: `my.other.app:quote`.
* Asterisk (*) can be used instead of app name or content type name. For instance `*:quote` will select content type `quote` from any app.
* *${app}* wildcard is used to denote current app name. So writing `${app}:*` will select all content types from the current app.
* Regular expressions are also supported. For example `my.other.app:^content*` will select all content types starting with `content` from the app `my.other.app`.
You can even use complex expressions with negative lookaheads like `((?!folder).)*$` that will return all content types except the ones containing `folder`.

allowPath
This is used to limit the path of the content that may be selected for this input. The site on which the content exists, can be wildcarded with ${site} Use one setting for each path expression.
Expand Down

0 comments on commit 7b64342

Please sign in to comment.