Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Extending LeftAndMain in Slverstripe 3


Reply

3 Posts   488 Views

Avatar
SS_Learner

12 April 2013 at 12:32pm Community Member, 18 Posts

Hi Friends
I have created a class test extending LeftAndMain and it is in test.php. Now when i created a template file with name test.ss ,it doesn't go there,it searches for test_Content.ss,and gives error that this file doesn't exists.
Can any one please explain me this behavior in SS3 /SS3.1 ?
Thanks

Avatar
UncleCheese

12 April 2013 at 2:29pm 4085 Posts

By default, you need to name your template YourClassName_Content.ss to create the "main" section of LeftAndMain in SS3.

Avatar
SS_Learner

12 April 2013 at 2:45pm Community Member, 18 Posts

Thanks Uncle Cheese for this quick reply.
Can u also help me with another question that when i am making a jstree in myclassname_Content.ss,it doesn't form the tree but i have checked all the required JS is already included in the SS3 CMS(i.e jquery.jstree.js and jquery.js),so in init i just have included my classname.js file which has the code to make the jstree.
Thanks