Add Feature
ID: addFeature
Adds a feature to a node.
The configuration for this feature is described using JSON Schema like this:
{
"title": "Add Feature",
"properties": {
"qname": {
"title": "Feature QName",
"type": "string"
},
"config": {
"title": "Feature Configuration",
"type": "object"
}
}
}
See the examples below for more detail.
Example #1
Let's say we want to automatically configure the filename for a piece of content when it is created. We can define an action of type addFeature
and configure it to automatically apply the f:filename
feature.
It might look like this:
{
"qname": "f:filename",
"config": {
"filename": "mynewfile.txt"
}
}
Example #2
Let's configure an action that sets up our content for thumbnailing. Here, we take advantage of the f:thumbnailable feature.
It might look like this:
{
"qname": "f:thumbnailable",
"config": {
"thumb500": {
"mimetype": "image/png",
"width": 500,
"height": 500
},
"thumb300": {
"mimetype": "image/gif",
"width": 300,
"height": 300,
"compression": 10
},
"thumb150": {
"mimetype": "image/jpeg",
"width": 150,
"height": 150,
"compression": 0
}
}
}