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.

Themes

Discuss SilverStripe Themes.

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

It just says "foo"


Reply

5 Posts   146 Views

Avatar
_Vince

6 August 2014 at 5:48pm Community Member, 161 Posts

I am working on a new theme. On, I think, 3.1.x (whatever Composer got me)

I have my templates directory, with Page.ss, and under that, an Includes and a Layout directory.

NOW... if I have the $Content variable in the main Page.ss, I get the content as per the CMS.

If I use the $Layout variable, I just get the word "Foo" and the template doesn't even look for the Page.ss that's in Layout.

I have tried changing "Layout" to "layout" but it doesn't make any difference.

I've never encountered this before. Any ideas?

Avatar
Willr

6 August 2014 at 6:20pm Forum Moderator, 5511 Posts

You haven't got any custom code in your website that overrides $Layout? Sounds like someones debugging code.

Avatar
_Vince

6 August 2014 at 6:30pm Community Member, 161 Posts

No, I haven't progressed as far as overriding Layout on the site yet. It IS running in DEV mode, I'll see if the "Foo" goes away in LIVE mode. Thanks for the suggestion... any others? I've already tried reinstalling cms and framework, and removing blog.

Avatar
Willr

6 August 2014 at 6:53pm Forum Moderator, 5511 Posts

I'd do a project folder wide search for 'Foo' you'll get a bunch of results but you should step through those and see where it could be coming from.

Avatar
_Vince

7 August 2014 at 7:16am Community Member, 161 Posts

Sorted.

Found that there was a copy of the cms and framework folders in the themes folder. I don't know if that changed anything but it might have been why I got the "Foo" and why changing from "layout" to "Layout" made no difference?

No idea... but anyway, it now works as well as ever. Thanks for the suggestions! :D