Page 1 of 1

Adding Page Peel

Posted: Tue May 19, 2015 11:20 am
by robsteruk
Hi

I am a newbie to CMS Made Simple and I am wanting to add a page peel feature to me CMS Made Simple site. I am using a widget and need to place a one time piece of code on my website similar to this:

Code: Select all

<__script__ src="http://cdnsysfiles.xxxxxx.net/javascripts/dwms.js"></__script> <__script__ type="text/javascript"> __dwms('123456/wp_12345') </__script>
Howevere I do not know where to place this. Can any body suggest where? Normally on an HTML file it would be placed just before the body tag on the relevant page.

Hope you can assist.

Thanks

Rob

Re: Adding Page Peel

Posted: Tue May 19, 2015 12:09 pm
by velden
Usually this code would be placed in the appropriate page template(s)(Layout -> Templates)

It would however be used on any page that uses that template(s). If that's not what you want you can use a separate template for those pages or use some logic in the template to only use the code on specific page aliases (the latter wouldn't be my favorite approach but it's a quick solution for a fixed number of - not changing - page aliases).

Re: Adding Page Peel

Posted: Tue May 19, 2015 12:12 pm
by robsteruk
Thanks for your reply.

I would like it to show on the home page. Sadly I still don't know in which file to add the code.

The site is www.polypostalpackaging.co.uk.

Sorry to appear so thick.

Rob

Re: Adding Page Peel

Posted: Tue May 19, 2015 12:38 pm
by velden
In the page overview in admin the used template is shown in the same row as the page (iirc it's even clickable).

Remember the page alias for the home page and then edit the template.

Before the closing <__body> tag type (assuming page alias for homepage is 'home':

Code: Select all

{if $page_alias == 'home'}
<__script__ src="http://cdnsysfiles.xxxxxx.net/javascripts/dwms.js"></__script> <__script__ type="text/javascript"> __dwms('123456/wp_12345') </__script>
{/if}
Note that this forum add's some underscores in the html tags.

[Solved] Adding Page Peel

Posted: Tue May 19, 2015 12:59 pm
by robsteruk
Thank you for your help - much appreciated.

All good now

Rob