Re: Viewing 2 or more elements in the same view in Cakephp

2013-02-27 Thread jodator
The elements are children to current view or a building blocks of your view.

There's no problem with displaying multiple element in one view.

Try it with simple elements:
# elem.ctp:
elem test

#elem2.ctp:
elem 2

# view.ctp:
My elments
element('elem'); ?>
element('elem2'); ?>
element('elem'); ?>
element('elem2'); ?>

But, if you're using some elements with JavaScript maybe they are 
not initialized properly. Do you check HTML output or debug the page in 
Firebug or Chrome Dev Tools?

Also check your names, you could have some typo. Enable debug mode and 
check errors.


On Wednesday, February 27, 2013 8:53:44 AM UTC+1, Victor Musvibe wrote:
>
> I am using Google API for displaying charts on my app. I am trying to view 
> more than two elements on the same view page (index.ctp). Meaning i am 
> trying to have more than 2 Charts on the same view page. The index page is 
> only showing the policies_accessible2012.ctp element. 
>
> Here is how i am calling the elements in my index.ctp
>
> 
> 
> 
>  $this->element('SurveyResults/2011/policies_accessible2011'); ?>
> 
>  $this->element('SurveyResults/2012/policies_accessible2012'); ?>
> 
> 
> 
>
> I do understand that if i have the following code, this will result in 
> SurveyResults/2012/policies_accessible2012 rendered as the parent view to 
> the current view
>
>  $this->element('SurveyResults/2011/policies_accessible2011'); ?>
>  $this->element('SurveyResults/2012/policies_accessible2012'); ?>
>
> I am just wondering if they is a way to show the 2 or more elements on the 
> same view. Thank you in advance
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Viewing 2 or more elements in the same view in Cakephp

2013-02-26 Thread Victor Musvibe
I am using Google API for displaying charts on my app. I am trying to view 
more than two elements on the same view page (index.ctp). Meaning i am 
trying to have more than 2 Charts on the same view page. The index page is 
only showing the policies_accessible2012.ctp element. 

Here is how i am calling the elements in my index.ctp




element('SurveyResults/2011/policies_accessible2011'); ?>

element('SurveyResults/2012/policies_accessible2012'); ?>




I do understand that if i have the following code, this will result in 
SurveyResults/2012/policies_accessible2012 rendered as the parent view to 
the current view

element('SurveyResults/2011/policies_accessible2011'); ?>
element('SurveyResults/2012/policies_accessible2012'); ?>

I am just wondering if they is a way to show the 2 or more elements on the 
same view. Thank you in advance

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.