0

I need to put this in the head section

BUT only for the CMS pages that I have running under a custom theme.- and only in the blank layout if possible been through a few locations and I am unsure where to put. I tried header.phtl in the theme folder but that didnt seem to work.

Hope to help thanks

  • sorry i dont understand how to make the code appear in forum. – shueardm Sep 19 '14 at 15:16
  • paste your code in your question and then click/drag to highlight it then click the icon {} this will allow code to be pasted or you can highlight it and hold the control key down and push the letter 'k' – Jason Tipton Sep 19 '14 at 16:07
1

First Create your template file in app/design/frontend/yourthemepath/template/page

Then Put this in the Custom Layout Update XML section of your CMS Page

<reference name="head">
    <block type="core/template" name="yourtheme_yourname" template="page/yourfile.phtml"/>
</reference>

This allows you to choose what theme/layout and even dates to apply this update.

  • Thank you - but I have many CMS pages I want to put into and I prefer to not have to copy that into every page. Is there a better way please – shueardm Sep 19 '14 at 15:38
  • Create file local.xml in app/design/frontend/yourtheme/layout and put the above xml there to apply it to all pages in that theme. – DaChronDon Sep 19 '14 at 16:02
  • I am not confident I can do this correctly. I just want to add meta tags to the head. If I make blank local.xml in themes folder , why would i need to state the block above, cant i just add the tags. When I am confused I wont try ( failsafe ) :) – shueardm Sep 20 '14 at 0:11
  • The XML calls the code in yourfile.phtml into the head block. You will need to put the meta tags in yourfile.phtml – DaChronDon Sep 21 '14 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.