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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Filetype uses wrong template file

Go to End

3 Posts   964 Views


Community Member, 141 Posts

25 July 2013 at 2:04am

I've got a pagetype called Map.php and it uses the default Template and an adjusted Layout.

Now I made a copy of Map.php (Map_FB.php which extends Map.php) and made a in my templates folder.
That way I can remove the header and footer and put that Map into an iFrame on Facebook.

But the page I created in the CMS still uses the default template, not the template file.
I flushed the cash, deleted the file and recreated it. But with ?showtemplate=1 it shows me SS uses the file.


Community Member, 244 Posts

29 July 2013 at 2:37pm

I haven't tried, but the problem is probably be the underscore _

Try renaming your the class in your php file to MapFB and your template

Templates with _ in the name relate to the page type, then an action on the class -


Community Member, 141 Posts

12 August 2013 at 5:03am

Hi and thanks for your reply. Think I missed the email notification for this.

I am now using the renderwith function and that works. But I'll try to remove the underscore and see if that works.
I wasn't aware of that. Couldn't find it the docs. Do you have a link for me?