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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Extending LeftAndMain in Slverstripe 3


Go to End


3 Posts   1449 Views

Avatar
SS_Learner

Community Member, 20 Posts

12 April 2013 at 12:32pm

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

Forum Moderator, 4102 Posts

12 April 2013 at 2:29pm

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

Avatar
SS_Learner

Community Member, 20 Posts

12 April 2013 at 2:45pm

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