Sunday, July 12, 2009

Creating dojo accordion Container/panes in Zend

Try Online : Accordion Container
Dojo provide very easy and nice way of creating different containers such as accordion, tab, border, and stack etc.
These containers hold different type of panes. These different panes in turn use to hold contents. contents can be simple text or it can be complete html.
Zend Framework collaboration with Dojo has made things quite easy. Zend Framework provide view helpers to achieve different type of dojo functionality.
In this article I am going to discuss how to create Accordion Container. accordion Container hold accordion panes. Each accordion pane hold different contents and open in a stylish way when user click on the title of the pane.
In order to enable dojo helpers in you Zend Framework application, you will need to make some initial configuration. read my tutorial "Zend Framework and Dojo: configuration" before reading this tutorial. After successfull configuration create a controller called "ContinerController.php" in your controllers directory and place the following code in it.


<?php
class ContainerController extends Zend_Controller_Action
{
public function accordionAction()
{

}
}


We have only defined an action in our controller, putting no code at all. you however can put whatever code you wish.
Now in /application/views/scripts/container/accordion.phtml place the following code.

<?php

$this->accordionContainer()->captureStart('main-container',
array('design' => 'headline'),
array(
'style'=>'height:400px;width:400px'
));

echo $this->accordionPane(
'home',
'This is home page',
array('region' => 'top','title'=>'Home'),
array('style' => 'background-color: white;')
);

echo $this->accordionPane(
'gallery',
'Contents of gallery here',
array('region' => 'left', 'title'=>'Gallery'),
array('style' => 'background-color: white;')
);

echo $this->accordionPane(
'Blog',
'Blog post here',
array('region' => 'center','title'=>'Blog'),
array('style' => 'background-color: white;')
);

echo $this->accordionContainer()->captureEnd('main-container');
?>


The code is pretty simple. we first call captureStart() method on accordionContainer(). this will start accordion container for us.
Once the accordion continer is started, we need to put accordion panes in it and at the end we will need to call captureEnd() method to end our accordion container.
The container holding the following accordion pane.
echo $this->accordionPane(
'home',
'This is home page',
array('region' => 'top','title'=>'Home'),
array('style' => 'background-color: white;')
);

The above code call accordionPane() helper method. This dojo helper method take an "id", "contents" to be displayed in the accordion pane, an array containing the special attributes of the accordion pane, and array of css attributes.

69 comments:

  1. I know this is an old post, but I am having problems getting dojo to work on any view but the index view. I configured dojo the way you described in your previous posts... any ideas on what to look for? Thanks!

    ReplyDelete
  2. hello,can you give us a complete exemple !

    ReplyDelete
  3. Its Complete example. Thanks

    ReplyDelete
  4. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
    python Training institute in Pune
    python Training institute in Chennai
    python Training institute in Bangalore

    ReplyDelete
  5. Some us know all relating to the compelling medium you present powerful steps on this blog and therefore strongly encourage contribution from other ones on this subject while our own child is truly discovering a great deal. Have fun with the remaining portion of the year.
    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training

    ReplyDelete
  6. I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 
    Data Science training in Chennai
    Data science training in Bangalore
    Data science online training

    ReplyDelete
  7. The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea.
    here by i also want to share this.
    data science online training

    ReplyDelete
  8. Amazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live.
    IT Institute in KK nagar | angularjs training in chennai | dot net training in chennai | Web Designing Training in Chennai

    ReplyDelete
  9. Thanks for one marvelous posting! I enjoyed reading it; you are a great author. I will make sure to bookmark your blog and may come back someday. I want to encourage that you continue your great posts.Informatica Training in Bangalore

    ReplyDelete
  10. Post is very useful. Thank you, this useful information.

    Softgen Infotech is the Best HADOOP Training located in BTM Layout, Bangalore providing quality training with Realtime Trainers and 100% Job Assistance.

    ReplyDelete
  11. Awesome,Thank you so much for sharing such an awesome blog...
    Informatica Training in Bangalore

    ReplyDelete
  12. It's late finding this act. At least, it's a thing to be familiar with that there are such events exist. I agree with your Blog and I will be back to inspect it more in the future so please keep up your act.

    business analytics course

    data analytics courses

    data science interview questions

    data science course in mumbai

    ReplyDelete
  13. Impressive! I finally found a great post here. Nice article on data science . It's really a nice experience to read your post. Thanks for sharing your innovative ideas to our vision.
    Data Science Course in Marathahalli
    Data Science Course Training in Bangalore

    ReplyDelete
  14. Study Digital Marketing Courses In Bangalore with ExcelR where you get a great experience and better knowledge.
     Digital Marketing Courses In Bangalore

    ReplyDelete
  15. Your Website is Very Impressive and Interesting , Thanks for your Good of Articles to Gaining a more Knowledge About Computer Languages.Look Below for more

    python training in chennai | python training in annanagar | python training in omr | python training in porur | python training in tambaram | python training in velachery

    ReplyDelete
  16. It is really great to know you being a responsible writer did take care about the information you have provided in this article. This is elegantly prepared and well-written in my opinion.
    SAP training in Kolkata
    Best SAP training in Kolkata
    SAP training institute in Kolkata

    ReplyDelete
  17. I concur with a ton of the focuses you made in this article. I value the work you have placed into this and expectation you keep composing regarding this matter.
    SAP training in Kolkata
    SAP training Kolkata
    Best SAP training in Kolkata
    SAP course in Kolkata

    ReplyDelete
  18. You have absolutely covered all the information in this content. I'm highly impressed with the quality of the content which you have written. Hope to read some more interesting articles.
    SAP training in Kolkata
    SAP course in kolkata

    ReplyDelete
  19. Such intense article like this one bounds the readers to enlarge their thinking power as they go through the article. I must say great research has been done before writing
    SAP training in Mumbai
    SAP course in Mumbai

    ReplyDelete
  20. I am impressed by the information that you have on this blog. It shows how well you understand this subject.
    Data Analyst Course

    ReplyDelete
  21. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
    data analytics courses

    ReplyDelete

  22. I am really happy to say it’s an interesting post to read . I learn new information from your article , you are doing a great job . Keep it up

    Devops Training in USA

    Hadoop Training in Hyderabad

    Python Training in Hyderabad

    ReplyDelete
  23. ExcelR provides data scientist course in pune with placement. It is a great platform for those who want to learn and become a data scientist. Students are tutored by professionals who have a degree in a particular topic. It is a great opportunity to learn and grow.

    data scientist course in pune with placement
    Data science courses
    Data scientist certification
    Data scientist courses

    ReplyDelete
  24. Thanks For Sharing Your Information Please Keep UpDating Us Time Just Went On Reading The article The Information shared Is Very Helpful.






    ReplyDelete
  25. I must admit that your post is really interesting. I have spent a lot of my spare time reading your content. Thank you a lot!
    data scientist training and placement in hyderabad

    ReplyDelete
  26. Great and an informative article shared . Thanks for sharing such useful information.

    Data Science Training in Pune

    ReplyDelete
  27. Bangaloredigitalmarketing provides the best Digital Marketing courses in bangalore with certification and placements in jayanagar, marathahalli
    digital marketing company in bangalore
    Digital Marketing courses in bangalore
    https://bengalurudigitalmarketing.blogspot.com/

    ReplyDelete
  28. Just pure brilliance from you here. I have never expected something less than this from you and you have not disappointed me at all. I suppose you will keep the quality work going on.
    data science classes in hyderabad

    ReplyDelete
  29. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained!
    data analytics courses in hyderabad

    ReplyDelete
  30. Exceptionally instructive case! There is loads of hint here that could previously any situation income started further to a rich interpersonal interaction cognizant up assessment. thanks! Clash Of Clans Hack Download

    ReplyDelete
  31. Best announce! this is an each level of simple to apply weblog that I can conclusively come steerage to more prominent age this yr! gratitude for useful declare. thanks! Wifi Password Hacker

    ReplyDelete
  32. Data analyst generally works on creation of reports based on company’s data driven KPI’s(generally involves descriptive analytics), whereas Data scientists understand business and domain along with the technicalities to understand what will happen in future(more on descriptive + predictive analytics both)
    Etlhive is a data science institute in pune. actuelly we wanted to promote our website on your site will you please contact me discus further details

    website: - www.etlhive.com
    contact: - +91 8055020011

    ReplyDelete
  33. Congratulations on your article, it was very helpful and successful. cbe683a8c82716414ffe971be8d635d2
    website kurma
    sms onay
    website kurma

    ReplyDelete
  34. Thank you for your explanation, very good content. ef26b2873954dadad33590d9528622cf
    define dedektörü

    ReplyDelete
  35. "I couldn't help but be drawn in by the eye-catching graphics and illustrations on this site. They add a unique and creative touch."
    Small yacht rental in Dubai

    ReplyDelete
  36. "This site has an amazing attention to detail. From subtle animations to carefully crafted icons, every element contributes to its visual appeal."rent a yacht dubai marina

    ReplyDelete
  37. "The choice of color palette on this site is spot-on. It creates a harmonious and visually pleasing atmosphere."
    Iraq 15-day tour

    ReplyDelete
  38. This article provides an excellent introduction to creating Accordion Containers using Dojo in Zend Framework. The step-by-step explanation and code samples make it easy for readers to understand and implement this functionality. The clear and concise writing style is highly appreciated. Great job!
    Is iim skills fake?

    ReplyDelete
  39. I have to say, your post is truly fascinating. I've read a lot of your articles in my free time. Thank you very much!
    Data Analytics Courses in Agra

    ReplyDelete
  40. This blog is a treasure chest of accordion wisdom! Just what I needed for my web project. Thanks for the guidance!
    Data Analytics Courses In Gujarat

    ReplyDelete
  41. This guide totally unlocked the accordion magic for me! I'm loving the sleek, expandable panels. Time to jazz up my website.
    Data Analytics Courses In Gujarat

    ReplyDelete
  42. This is such an insightful and informative piece! I

    Digital Marketing Courses in Hamburg

    ReplyDelete
  43. Creating a Dojo Accordion Container/panes in Zend is a useful technique for enhancing the user interface and organizing content effectively within web applications. In the realm of data analytics, London offers a range of Data Analytics courses that equip professionals with the skills to analyze and leverage data for informed decision-making. Please also Digital Marketing Courses in London .

    ReplyDelete
  44. the post was great and the content was really informative
    Data Analytics With Python

    ReplyDelete
  45. Excellent guide on creating Dojo accordion containers in Zend! Your step-by-step explanation and clear code make it easy for readers to implement. Thanks for sharing this valuable tutorial.

    How Digital marketing is changing business

    ReplyDelete
  46. This article is a great resource for anyone looking to enhance their web applications with Dojo and Zend Framework! The clear explanation of creating Accordion Containers is super helpful, and the integration of Dojo’s features with Zend’s view helpers is well-articulated. I appreciate the focus on initial configuration, making it easy for developers to follow along. Overall, this tutorial is informative and practical—definitely a must-read for developers aiming to improve their UI
    data analytics courses in dubai

    ReplyDelete
  47. Thankyou for sharing the brief information about creating dojo containers.
    Data Science Courses in Hauz Khas

    ReplyDelete
  48. Thanks for sharing this tutorial! It's great to see how easily the Dojo toolkit can enhance a Zend Framework application, especially with visually appealing UI elements like the Accordion Container.
    Data science courses in Mysore

    ReplyDelete
  49. This blog provides a step-by-step guide to creating Accordion ContainerPanes with Dojo, a popular JavaScript framework. A useful resource for developers working with Dojo or seeking to improve their UI skills!
    Data science course in Gurgaon

    ReplyDelete