From 1434190c36ee76a520dab04f242e4c584872b217 Mon Sep 17 00:00:00 2001 From: Anselm Christophersen Date: Wed, 12 Sep 2012 19:53:06 +0300 Subject: [PATCH] Removed some line breaks for code blocks to render properly in the doc module See for what I mean --- .../tutorials/5-dataobject-relationship-management.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/docs/en/tutorials/5-dataobject-relationship-management.md b/docs/en/tutorials/5-dataobject-relationship-management.md index 787014b17..ed22e5e8f 100644 --- a/docs/en/tutorials/5-dataobject-relationship-management.md +++ b/docs/en/tutorials/5-dataobject-relationship-management.md @@ -127,16 +127,13 @@ All customization to fields for a page type are managed through a method called public function getCMSFields() { // Get the fields from the parent implementation $fields = parent::getCMSFields(); - // Create a default configuration for the new GridField, allowing record editing $config = GridFieldConfig_RelationEditor::create(); - // Set the names and data for our gridfield columns $config->getComponentByType('GridFieldDataColumns')->setDisplayFields(array( 'Name' => 'Name', 'Project.Title'=> 'Project' // Retrieve from a has-one relationship )); - // Create a gridfield to hold the student relationship $studentsField = new GridField( 'Students', // Field name @@ -144,10 +141,8 @@ All customization to fields for a page type are managed through a method called $this->Students(), // List of all related students $config ); - // Create a tab named "Students" and add our field to it $fields->addFieldToTab('Root.Students', $studentsField); - return $fields; } } @@ -232,7 +227,6 @@ to configure it a bit differently. // ... public function getCMSFields() { // ... - // Same setup, but for mentors $mentorsField = new GridField( 'Mentors', @@ -241,7 +235,6 @@ to configure it a bit differently. GridFieldConfig_RelationEditor::create() ); $fields->addFieldToTab('Root.Mentors', $mentorsField); - return $fields; } } @@ -290,7 +283,6 @@ a named list of object.

$Title

$Content - @@ -349,7 +341,6 @@ we can access the "Students" and "Mentors" relationships directly in the templat

$Title

$Content -

Students

<% if Students %>
    @@ -360,7 +351,6 @@ we can access the "Students" and "Mentors" relationships directly in the templat <% else %>

    No students found

    <% end_if %> -

    Mentors

    <% if Mentors %>
      @@ -371,7 +361,6 @@ we can access the "Students" and "Mentors" relationships directly in the templat <% else %>

      No mentors found

      <% end_if %> -