Jump to:

3392 Posts in 976 Topics by 852 members

Template Questions

SilverStripe Forums » Template Questions » Naming conventions

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

Page: 1
Go to End
Author Topic: 1045 Views
  • yurigoul
    Avatar
    Community Member
    202 Posts

    Naming conventions Link to this post

    My question is: Are there naming conventions I should be aware of?

    I ask this because I just ran in some trouble because I - and I tested it - forgot to name one my subtheme files with a capital P (as in HomePage.ph versus Homepage.php). This resulted in the following error - but the error is now resolved:

    [Warning] Unknown class passed as parameter
    GET /s/dev/build

    Line 420 in /Applications/MAMP/htdocs/s/sapphire/core/Object.php

    This was not very helpful, but ok. I first thought it had to do with the fact that I used Homepage for my class, or a field named about, antother named info.

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Naming conventions Link to this post

    It is case sensitive, so if your file name is Homepage, the class it contains must also be Homepage.

  • yurigoul
    Avatar
    Community Member
    202 Posts
    1045 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.