Extend site model

cancel
Showing results for 
Search instead for 
Did you mean: 
ahuret
Member II

Extend site model

Hello,

I would like to extend the site model to add a "labels" property (array of strings). Priority is to be able to manage those labels via alfresco REST API and to be able to search for site with label as parameter. And then but with less priority it would be nice to see this new field in Share UI.

I don't understand how to proceed here...

Thank you in advance !

Antoine

1 Reply
prorobin
Active Member

Re: Extend site model

Hello @ahuret ,

 

there are several ways to do it.

Create a new custom site subtype:

		<type name="my:customSite">
			<title>CustomSite</title>
			<parent>st:site</parent>
			<properties>
				<property name="my:listValuesForSite">
					<title>List Values For Site</title>
					<type>d:text</type>
					<multiple>true</multiple>
				</property>
			</properties>
		</type>

or simply create a new aspect:

		<aspect name="my:customSiteAspect">
			<title>Aspect for Site</title>
			<properties>
				<property name="my:listForSite">
					<type>d:text</type>
					<multiple>true</multiple>
				</property>
			</properties>
		</aspect>

I personally advise to use the first solution if you only need to add this multivalued properties on sites.

Check the official documentation for more infos about customization of Alfresco content models.