How to setup preferences for Content Browser portlet
For now, ECM supported four usecases to modify Content Browser portlet:- Path
- Query
- Script
- Detail document
Usecase is Path
<?xml version="1.0" encoding="UTF-8"?> <portlet-preferences> <!-- Specify the usecase will be use --> <preference> <name>usecase</name> <value>path</value> <read-only>false</read-only> </preference> <!-- Setup the default repository name for content browser portlet --> <preference> <name>repository</name> <value>repository</value> <read-only>false</read-only> </preference> <!-- Specify the workspace name will be use in repository --> <preference> <name>workspace</name> <value>system</value> <read-only>false</read-only> </preference> <!-- Specify the root path and you will see all child nodes when browse the portlet --> <preference> <name>path</name> <value>/jcr:system/exo:ecm/exo:taxonomies</value> <read-only>false</read-only> </preference> <!-- When you choose usecase is path you can use this preference to allow show reference documents or not --> <preference> <name>reference</name> <value>true</value> <read-only>false</read-only> </preference> <!-- When you choose usecase is path you can use this preference to allow show child node is document or not --> <preference> <name>child</name> <value>true</value> <read-only>false</read-only> </preference> <!-- This one will allow show the tag map or not. --> <preference> <name>viewTagMap</name> <value>true</value> <read-only>false</read-only> </preference> <!-- When you choose usecase is any type you should specify the template type which will be show in the UI Check for detail in ecm-views-configuration.xml For now, ECM supported two type are PathList & TreeList --> <preference> <name>template</name> <value>PathList</value> <read-only>false</read-only> </preference> <!-- This preference related to template, this one specify the template which will be use to display child node document. --> <preference> <name>boxTemplate</name> <value>DocumentView</value> <read-only>false</read-only> </preference> <!-- This preference will be use when choose usecase is path or query. This one specify the number of item for each page. --> <preference> <name>nbPerPage</name> <value>20</value> <read-only>false</read-only> </preference> <!-- This preference will be use when choose usecase is path. This one allow show or not the tool bar. --> <preference> <name>viewToolbar</name> <value>true</value> <read-only>false</read-only> </preference> <!-- This preference will be use when choose any usecase. This one allow show or not the comment action. --> <preference> <name>viewComment</name> <value>true</value> <read-only>false</read-only> </preference> <!-- This preference will be use when choose any usecase. This one allow show or not the vote action. --> <preference> <name>viewVote</name> <value>true</value> <read-only>false</read-only> </preference> </portlet-preferences>
Usecase is Query
<?xml version="1.0" encoding="UTF-8"?> <portlet-preferences> <!-- Specify the usecase will be use --> <preference> <name>usecase</name> <value>query</value> <read-only>false</read-only> </preference> <!-- Setup the default repository name for content browser portlet --> <preference> <name>repository</name> <value>repository</value> <read-only>false</read-only> </preference> <!-- Specify the workspace name will be use in repository --> <preference> <name>workspace</name> <value>collaboration</value> <read-only>false</read-only> </preference> <!-- When you choose usecase is query you should use this preference to specify the status of query is new query or existing query. --> <preference> <name>isAddNew</name> <value>true</value> <read-only>false</read-only> </preference> <!-- When you choose usecase is query you have to use this preference to setup the type of query will be use is xpath or sql --> <preference> <name>queryLanguage</name> <value>xpath</value> <read-only>false</read-only> </preference> <!-- You have to use this preference to init the query statement when your query status is new --> <preference> <name>queryStatement</name> <value>/jcr:root/Documents/Live//element(*, exo:article)</value> <read-only>false</read-only> </preference> <!-- You should specify the template type which will be show in the UI For now, ECM support one type is QueryList. --> <preference> <name>template</name> <value>QueryList</value> <read-only>false</read-only> </preference> <!-- If your query status is existing then you have to use this preference to specify the query type is personal or shared query. --> <preference> <name>queryType</name> <value></value> <read-only>false</read-only> </preference> <!-- When you choose usecase is query and query status is existing then you have to use this preference to specify the query location. Normaly all existing shared queries stored in folder: /jcr:system/exo:ecm/queries personal queries stored in folder: /Users/$username/Private/Queries --> <preference> <name>queryStore</name> <value></value> <read-only>false</read-only> </preference> <!-- This preference related to template, this one specify the template which will be use to display child node document. --> <preference> <name>boxTemplate</name> <value>DocumentView</value> <read-only>false</read-only> </preference> <!-- This one specify the number of item for each page. --> <preference> <name>nbPerPage</name> <value>20</value> <read-only>false</read-only> </preference> <!-- This preference will allow show the tool bar or not. --> <preference> <name>viewToolbar</name> <value>true</value> <read-only>false</read-only> </preference> <!-- This preference will be use when choose any usecase except detail-document. This one allow show the tag map or not. --> <preference> <name>viewTagMap</name> <value>true</value> <read-only>false</read-only> </preference> <!-- This preference will be use when choose any usecase. This one allow show or not the comment action. --> <preference> <name>viewComment</name> <value>true</value> <read-only>false</read-only> </preference> <!-- This preference will be use when choose any usecase. This one allow show or not the vote action. --> <preference> <name>viewVote</name> <value>true</value> <read-only>false</read-only> </preference> </portlet-preferences>
Usecase is Script
<?xml version="1.0" encoding="UTF-8"?> <portlet-preferences> <!-- Specify the usecase will be use --> <preference> <name>usecase</name> <value>script</value> <read-only>false</read-only> </preference> <!-- Setup the default repository name for content browser portlet --> <preference> <name>repository</name> <value>repository</value> <read-only>false</read-only> </preference> <!-- Specify the workspace name will be use in repository --> <preference> <name>workspace</name> <value>collaboration</value> <read-only>false</read-only> </preference> <!-- You have to choose one script which will be executed when the porlet init. --> <preference> <name>scriptName</name> <value>GetDocuments.groovy</value> <read-only>false</read-only> </preference> <!-- Specify the template type which will be show in the UI For now, ECM supported one sample type is ScriptList --> <preference> <name>template</name> <value>ScriptList</value> <read-only>false</read-only> </preference> <!-- This preference related to template, this one specify the template which will be use to display child node document. --> <preference> <name>boxTemplate</name> <value>DocumentView</value> <read-only>false</read-only> </preference> <!-- This one specify the number of item for each page. --> <preference> <name>nbPerPage</name> <value>20</value> <read-only>false</read-only> </preference> <!-- This preference will be use to allow show the tag map or not --> <preference> <name>viewTagMap</name> <value>true</value> <read-only>false</read-only> </preference> <!-- This preference will be use to allow show the comment action or not. --> <preference> <name>viewComment</name> <value>true</value> <read-only>false</read-only> </preference> <!-- This preference will be use to allow show the vote action or not. --> <preference> <name>viewVote</name> <value>true</value> <read-only>false</read-only> </preference> </portlet-preferences>
Usecase is Detail document
<?xml version="1.0" encoding="UTF-8"?> <portlet-preferences> <!-- Specify the usecase will be use --> <preference> <name>usecase</name> <value>detail-document</value> <read-only>false</read-only> </preference> <!-- Setup the default repository name for content browser portlet --> <preference> <name>repository</name> <value>repository</value> <read-only>false</read-only> </preference> <!-- Specify the workspace name will be use in repository --> <preference> <name>workspace</name> <value>collaboration</value> <read-only>false</read-only> </preference> <!-- Specify the category path which contain the documents --> <preference> <name>path</name> <value>/Documents/Live</value> <read-only>false</read-only> </preference> <!-- Specify the name of document in category when you choose the usecase is detail-document --> <preference> <name>documentName</name> <value>article</value> <read-only>false</read-only> </preference> <!-- This preference will be use specify the template which will be use to display document. --> <preference> <name>boxTemplate</name> <value>DocumentView</value> <read-only>false</read-only> </preference> <!-- This preference will be use to allow show the comment action or not. --> <preference> <name>viewComment</name> <value>true</value> <read-only>false</read-only> </preference> <!-- This preference will be use to allow show the vote action or not. --> <preference> <name>viewVote</name> <value>true</value> <read-only>false</read-only> </preference> </portlet-preferences>
on 30/11/2008 at 04:25