Skip to content

Instantly share code, notes, and snippets.

@fazy
Created May 13, 2013 09:08
Show Gist options
  • Save fazy/5567094 to your computer and use it in GitHub Desktop.
Save fazy/5567094 to your computer and use it in GitHub Desktop.
Example YAML representation of some data fixtures for a Symfony CMF project.
# Content fixtures:
# pages:
# blocks (optional):
# a page without blocks will be created as a category (Category type)
# a page with blocks will be created as a page (Page type)
# pages (optional):
# name (required):
# title (optional):
# route (optional): full route, otherwise route is generated from the name of the page and its parents
#
# blocks:
# blocks (optional):
# a block with child blocks will be created as a container block
# name (optional):
# content (optional):
# a block without child blocks must have a name and content
pages:
-
name: ireland
title: Home
moveAllowed: false
blocks:
-
name: title
content: Free Conference Call Ireland – Powwownow
type: plain-text-block
-
name: intro
content: The Free Conference Calling Service for Business People with More Sense Than Money
-
name: content
content: Welcome to the new and improved Powwownow Ireland site.
pages:
-
name: about
title: About Us
blocks:
-
name: title
content: Powwownow - About Us
type: plain-text-block
-
name: content
blocks:
-
name: sub-container
blocks:
-
name: intro
content: This page explains everything you need to know about Powwownow Ireland.
-
name: sub-sub-container
blocks:
-
name: super-deep
content: This block is a child of a container, which is itself a child of a container.
-
name: sub-content
content: This is some extra, bonus content! :)
-
name: sub-level-1
pages:
-
name: deep-page
title: Deep Page
blocks:
-
name: title
content: Deep block
type: plain-text-block
-
name: content
blocks:
-
name: block-1
content: Hello, I am a very deep block
-
name: block-2
content: Block 2 in the very deep block.
-
name: reference-page
title: Reference Page
blocks:
-
name: reference-to-rich
type: reference-block
path: /cr/ireland/intro
-
name: reference-to-plain
type: reference-block
path: /cr/ireland/sub-level-1/deep-page/title
-
name: container-of-references
blocks:
-
name: contained-reference-to-rich
type: reference-block
path: /cr/ireland/intro
-
name: contained-reference-to-plain
type: reference-block
path: /cr/ireland/sub-level-1/deep-page/title
-
name: contained-container
blocks:
-
name: double-contained-reference-to-rich
type: reference-block
path: /cr/ireland/sub-level-1/deep-page/content/block-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment