Skip to content
This repository

Error in View blocks section sample code #220

Merged
merged 1 commit into from about 2 years ago

2 participants

Eliezer Talón Mark Story
Eliezer Talón

This has been raised as ticket #83 in Lighthouse.

In the second sample code, View::extend is called with 'Common/view', and that would render app/Views/Posts/Common/view.ctp instead of app/Views/Common/view.ctp, which is the where the view is according to the description in previous paragraphs.

Mark Story markstory merged commit 66fec0a into from
Mark Story markstory closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 2 authors.

Mar 15, 2012
Eliezer Talón Fixed view block path in sample code refs #83 c0c05a7
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  en/views.rst
6  en/views.rst
Source Rendered
@@ -87,7 +87,7 @@ un-captured content from the extending view. Assuming our view file has a
87 87
 
88 88
     // app/View/Posts/view.ctp
89 89
     <?php
90  
-    $this->extend('Common/view');
  90
+    $this->extend('/Common/view');
91 91
 
92 92
     $this->assign('title', $post)
93 93
 
@@ -115,8 +115,8 @@ more than once in a view file will override the parent view that will be
115 115
 processed next::
116 116
 
117 117
     <?php
118  
-    $this->extend('Common/view');
119  
-    $this->extend('Common/index');
  118
+    $this->extend('/Common/view');
  119
+    $this->extend('/Common/index');
120 120
 
121 121
 The above will result in ``/Common/index.ctp`` being rendered as the parent view
122 122
 to the current view.
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.