Setting parent page metadataΒΆ

Every ‘parent’ page (blog, events, etc) needs a bit of metadata added manually in the django admin on the page model. If your user account doesn’t have access to [website.glass/admin](http://website.glass/admin/), please [contact Kasey](mailto:kasey@kellycreativetech.com) to make changes to this area.

On the page model in In the “Glass meta” field, add this as valid JSON:

```
{
“child_default_template”: “templates/blog/post.html”, “child_name_plural”: “Blog Posts”, “child_name”: “Blog Post”, “child_default_path”: “blog/%Y/%m/%d/”

}

```

If ‘input_order’ is already populated on the page, leave it as. Otherwise, the above snippet will pre-populate the Create New Page fields on the parent page in the glass frontend editor. The child_default_path has those date tags that will just grab today’s date to be used as the publish date.

Note

Today’s date will be set when you create a new page, but this is not a dynamically generated URL based on the actual publish date of the page. Once the page is created you need to manually change the path if you’d like the URL to change.

Some sites don’t require that, so blog/entry or just blog/` is fine. If it’s an existing site, follow the pattern that is already determined so it’s consistent. The value you set for child_name is used on a button in the UI, and my preference is to have those Title Cased. For example, “News Post”, “Message”, “Press Release”, or “Event” are all common values here. Be descriptive, short, and clear.