Put your element code in app/view/elements
and you can display them with:
echo $this-renderElement(element_name);
On Nov 21, 8:52 am, releod [EMAIL PROTECTED] wrote:
Hello, I am wondering if there is a better approach to this built into
CakePHP 1.2
Basically I have a few views,
From my understanding, if you have a form (or any other chunk of html)
that is used by several views, then it clearly qualifies as an
element. Sure, it's a private element (only used by views in /user),
but still an element.
You could always create subfolders under the elements folder, so you'd
Cool, thanks - makes sense.
On Nov 21, 4:52 am, grigri [EMAIL PROTECTED] wrote:
From my understanding, if you have a form (or any other chunk of html)
that is used by several views, then it clearly qualifies as an
element. Sure, it's a private element (only used by views in /user),
but
Another solution extend basic view class.
?php
class ExView extends View
{
function renderPartial($name, $params = array(), $loadHelpers =
false) {
if ((strpos($name, '\\')===false) (strpos($name,
'/')===false)) {
$name = '..' . DS .
Where is the best place to keep files that extend the CORE CAKE
Framework?
On Nov 21, 10:30 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Another solution extend basic view class.
?php
class ExView extends View
{
function renderPartial($name, $params = array(), $loadHelpers =
In place where thay should be.
For view class extensisions correct place is /app/views folder
BTW: @grigri
Your proposiiton need aditional manual work. We need to describe each
subview folder in bootstrap or create aditional code that will take
time.