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.

Customising the CMS /

Overwrite a CMS template


Reply


5 Posts   1605 Views

Avatar
GertThiel

Community Member, 7 Posts

25 January 2009 at 3:04am

Edited: 25/01/2009 3:04am

Howdy!

To integrate Google Conversion Tracking I would like to overwrite ReceivedFormSubmission.ss which is located im cms/templates/. If I place a file with the same name in mysite/templates/ or themes/mytheme/templates/Layouts it doesn't get used by SilverStripe.

Will I have to overwrite a original SilverStripe file which might be updated upstream later?

Thanks in advance for any help.

Gert

Avatar
GertThiel

Community Member, 7 Posts

27 January 2009 at 4:03am

I couldn't help myself yet :-(
Will I ever get an answer?

Avatar
UncleCheese

Forum Moderator, 4094 Posts

27 January 2009 at 4:22am

Well, there are a couple things you can do. First, I wouldn't be using the CMS form creator in the first place. It's been sunset in the 2.3 version of SS in favor of custom forms.

But if you are, can you explain why you need to mod the template? If your javascript hooks are unobtrusive, you shouldn't need to change any markup.

Avatar
GertThiel

Community Member, 7 Posts

27 January 2009 at 9:49pm

I consider to modify ReceivedFormSubmission.ss to include the Google Conversion Tracking script, so only successful (contact) form submissions gets tracked.

Avatar
orion

Community Member, 20 Posts

18 February 2010 at 5:12pm

uncle cheese,

I have a project where I need to upload text content to some pages of an unfinished site, while developing the rest of it. My concern is that when i update the site, will I overwrite all my content. Is there a way I can prevent this?

Thank you in advance!