Jump to:

3393 Posts in 976 Topics by 852 members

Template Questions

SilverStripe Forums » Template Questions » Develop my first template

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

Page: 1
Go to End
Author Topic: 765 Views
  • Kai
    Avatar
    Community Member
    4 Posts

    Develop my first template Link to this post

    Hello, I am a Joomla superuser & developer, and I have used Joomla for over 5 years now. I am also a PHP developer, and I have developed a bunch of Joomla templates. I work as a webdeveloper at a ad-agency, and I would like to start using SilverStripe for new sites. SilverStripe looks very promising, and really look forward to get to know more about this tool.

    Since I am new to SilverStripe, I would like to know how to build my own template? I would like to create a new template from scratch. I have coded my own HTML template with CSS. What is correct folderstructure?

    I tried to duplicate the tutorial template, but that didn't worked well.

  • Mrfixer
    Avatar
    Community Member
    49 Posts

    Re: Develop my first template Link to this post

    My advise would be to check the tutorial again, i followed it myself only 2 days ago and im having no problems at all, important points would be to note that:

    "mysite" folder contains your _config.php and also a sub-folder "code" that contains the controllers for your page templates (important if you need to add seperate fields into a page templates CMS)

    as for the folder structure of your theme just place your themes folder into the "themes" folder alongside blackcandy and tutorial themes, then its just a case of ensuring that inside your theme folder you have a "css, images and templates" folders and inside the templates folder"Layouts and Includes" includes folder for includes such as footer and in my case left/right sidebars and header and then Page.ss inside templates file and also in the Layouts folder (any other page templates that you have created as .php inside "mysite/code" folder also need to be in here with the same name as in "mysite/code" except with a .ss extension)

    Dont forget to edit mysite/_config.php with your theme name and dont do what i kept doing and not adding the $Form variable into your theme, lost count of the number of times i did this and had to edit config back to blackcandy so i could login to CMS.

    Like i say im new to SS too but these are my settings and working great at this end, if they aint 100% im sure someone will correct me

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Develop my first template Link to this post

    For more theme / template documentation check out the Wiki - http://doc.silverstripe.org/sapphire/en/topics/theme-development.

  • Kai
    Avatar
    Community Member
    4 Posts

    Re: Develop my first template Link to this post

    Thanks for your reply Mrfixer, I reuploaded the template and it worked fine with flush. I forgot to edit the config files, but thanks to you for pointing that out for me. SilverStripe looks very promising, and I really look forward to start using this amazing tool.

    I hope the GUI in CMS will be modernized a bit for next versions - looks a bit old to me

  • deny
    Avatar
    Community Member
    1 Post

    Re: Develop my first template Link to this post

    Thanks for reply,Because its first develop my first template.

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Develop my first template Link to this post

    I hope the GUI in CMS will be modernized a bit for next versions - looks a bit old to me

    Yes this is one of the major discussion points in the dev mailing list (http://groups.google.com/group/silverstripe-dev). The design has been around since the first 2.0 release (2006/7) with some minor enhancements in 2.2 done.

    765 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.