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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Template Questions /

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

Naming conventions


Go to End


3 Posts   1470 Views

Avatar
yurigoul

Community Member, 203 Posts

30 October 2009 at 4:42am

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.

Avatar
Hamish

Community Member, 712 Posts

2 November 2009 at 10:21pm

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

Avatar
yurigoul

Community Member, 203 Posts

4 November 2009 at 12:29am