Collection data - adampatterson/Tentacle GitHub Wiki

Further instructions on the scaffold data can be found here: Collection Structure

Scaffolded data is saved independently from the regular post data, this is to help search-ability as this data is stored as a serialized array.

The date is loaded in the page controller:

$post = load::model ( 'page' );
$post_meta = $post->get_page_meta( $post->id ); ?>

An Object like this is returned:

Meta Object
(
    [name] => Adam Patterson
    [country] => Canada
    [twitter] => adampatterson
)

To display the data simply call the object node like so. <?= $page_meta->name ?> would output Adam Patterson.

The above object was created from the following Scaffolding data YAML. As you can see you wont have to extend, register or modify any code. Scaffolding simply works.

/**
name: text:Name:Enter a short description.
country: options(Canada,United States, Mexico):Select a country
twitter: text:Twitter handle:Without the @
*/

Custom data is set on the page template that you will be rendering it.

[unique_key]: [text,textareapassword,options(comma,separated)]:[Title]:[Any helper text]

Need some repitition?

[unique_key]
  [unique_key]: [text,textareapassword,options(comma,separated)]:[Title]:[Any helper text]
  [unique_key]: [text,textareapassword,options(comma,separated)]:[Title]:[Any helper text]

YAML

/**
display: admin
paged: paged
posts_per_page: 2
description: text:Description:Enter a short description.
password: password:Password:Enter your password
options: options(Canada,United States, Mexico):Select a country
textarea: textarea:This is a text area
repeater:
  title: text:Repeater title block
  details: text:Repeater detail block
  password: password:Enter your password
*/