I'm trying to add a div that will exist on all pages of the site, but I can't find out how to add html to the body. I've edited the template phtml file (which only contains one section of the body anyways, so don't think that's the correct way to edit), and changes to the phtml file does not take effect anyways.

How do I go about this? I'm trying to just add a single div to the site, containing a popup configured by an existing javascript file. Just not sure how to add code.

Edit: For example when I inspect a page I see line , but no files or column files contain that line.

1 Answer 1


I am assuming you have already created a layout file for your module. Goto layout file for your frontend theme and add add below code

    <reference name="content">
        <block name="block_name" type="<block_handle/path to block>" template="path_to_phtml" />

Above code will add your block and phtml file added above in all the pages on front end

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.