---
agentTools:
  projectIndex: https://opencontent.readme.io/llms.txt
---

# Workflow / Content Staging

Simple Workflow / Content Staging in available on multi items templates

1. publish status : draft / published

*Please note that you must have at least a value "published" (by convention) in your schema for this to work. You cannot translate this value, but you can translate it's label in the option file.*

2. start publish date / end publish date

The idea is : when the item is not published, you can only see it when you are in edit mode.

To make it works,you need only to have the fields with specific names present in schema.json

Example of schema and options :

[block:code]
{
  "codes": [
    {
      "code": "\"publishstartdate\": {\n  \"title\": \"Publish Start Date\",\n  \"required\": true,\n  \"default\": \"today\"\n},\n\"publishenddate\": {\n  \"title\": \"Publish End Date\",\n  \"required\": true,\n  \"default\": \"2099-12-31\"\n},\n\"publishstatus\": {\n  \"title\": \"Status\",\n  \"enum\": [ \"draft\", \"published\" ],\n  \"required\": true,\n  \"default\": \"draft\"\n}",
      "language": "json",
      "name": "schema.json"
    },
    {
      "code": "\"publishstartdate\": {\n  \"type\": \"date\",\n  \"picker\": {\n    \"format\": \"DD/MM/YYYY\",\n    \"minDate\": \"2000-01-01\",\n    \"maxDate\": \"2099-12-31\",\n    \"locale\": \"nl\"\n  }\n},\n\"publishenddate\": {\n  \"type\": \"date\",\n  \"picker\": {\n    \"format\": \"DD/MM/YYYY\",\n    \"minDate\": \"2000-01-01\",\n    \"maxDate\": \"2099-12-31\",\n    \"locale\": \"nl\"\n  }\n}",
      "language": "json",
      "name": "options.json"
    }
  ]
}
[/block]

A full example can be found in the [Articles template](http://www.openextensions.net/templates/open-content/articles)

[block:callout]
{
  "type": "info",
  "body": "A. You must use a Multi-item template.\nB. You should set  \"index\": true in the root of your manifest.\n\nWhen you add Workflow to existing Data, choose in the module action dropdown:\nFilter Settings > Re-index Module.\n(you will not see this if index is not set to true)",
  "title": "For this to work there are 2 conditions."
}
[/block]