Smartsite 7.1 - ...
<assets> element
This section holds the assets configuration.
The example shown contains the internal default configuration, which means that within an actual smartsite.assets.config configuration file, the actions, contenttypemappings and metadataextractionmappings elements and the attributes referring to these elements can be left out.
Also, the excludeextensions attribute on the configuration element and the contenttypes attribute on the assetfolders element within this example are using the built-in default values.
So, an actual smartsite.assets.config configuration file which uses all the default settings could be something like this:
XML |
Copy Code
|
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.microsoft.com/.NetConfiguration/v2.0 System/Schemas/Configuration/smartsite.config.xsd">
<assets>
<assetfolders>
<assetfolder code="SharedAssets" rootitem="SHARED_ASSETS" folder="/Assets/Library" type="localfolder" />
</assetfolders>
</assets>
</configuration>
|
Example
XML |
Copy Code
|
<assets>
<actions>
<group name="_default">
<action contenttype="IMG" fieldname="width" value="//generalproperties/property[@name='width']" />
<action contenttype="IMG" fieldname="height" value="//generalproperties/property[@name='height']" />
<action contenttype="IMG" fieldname="filesize" value="//generalproperties/property[@name='size']" />
<action contenttype="BIN" fieldname="filesize" value="//fileproperties/property[@name='size']" />
</group>
</actions>
<contenttypemappings>
<group name="_default">
<mapping contenttype="IMG" extensions="jpg jpeg png gif bmp" />
<mapping contenttype="BIN" extensions="docx xlsx pptx odt pdf doc xls ppt" />
<mapping contenttype="VDO" extensions="avi mov mpg mpeg mpe mp4 mkv wmv m4v divx ogg 3gp ogv flv webm" />
</group>
</contenttypemappings>
<metadataextractionmappings>
<group name="_default">
<mapping filter="Smartsite.Core.ImageMetadataExtractor, Smartsite.Base" extensions="jpg jpeg png gif bmp" />
<mapping filter="Smartsite.Core.OpenXmlDocumentPropertiesExtractor, Smartsite.Base" extensions="docx pptx xlsx odt" />
</group>
</metadataextractionmappings>
<assetfolders contenttypes="IMG,BIN,VDO">
<assetfolder code="SharedAssets" rootitem="SHARED_ASSETS" folder="/Assets/Library" type="localfolder">
<configuration autosync="true"
excludeextensions="dll exe config bak db DS_Store js aspx asp mvc"
contenttypemappings="_default"
actions="_default"
metadataextractionmappings="_default"
/>
</assetfolder>
</assetfolders>
</assets>
|
Attributes
None.
Parent element
Element name |
Description |
<configuration> |
This is the root element of every Smartsite configuration file. |
Child elements
Element name |
Description |
<actions> |
Contains one or more group elements, each of them grouping a set of actions. |
<contenttypemappings> |
Contains mappings between contenttypes and file-extensions. |
<metadataextractionmappings> |
Contains mappings between one or more metadata extraction filter(s) and file-extensions. |
<assetfolders> |
Root element for one or more assetfolder configuration element(s). |