5

I'm trying to make different page where i need PHP. thats why i use a phtml file. I don't want to make any changes to the other Magento layouts so I just want to include the phtml file via the CMS.

I've made a phtml file in: mycustomtemplate/template/page/page.phtml

that file contains just 'test'.

then I've tried to call in the magento CMS->new page->content tab with:

{{block type="core/template" template="page/page.phtml"}}

but nothing shows up. Is there any way to do this? And how..

asked Apr 27, 2013 at 13:35

4 Answers 4

6

The syntax is correct, so the issue is theme misconfiguration or the "Test" output is being hidden in the browser. View source and confirm that the latter is not the case.

Try creating a copy of the file at frontend/base/default/template/page/page.phtml as this template location has to work - if the content appears, the issue is theme misconfiguration.

Raphael at Digital Pianism
70.8k37 gold badges192 silver badges357 bronze badges
answered Apr 27, 2013 at 14:09
0
1

It depends on what version of Magento you're running if you're trying to place the file in the base template - make sure that you're not placing the file in the (now deprecated) default/default path:

Pre 1.4CE/1.8EE:

frontend/default/default/template/page/page.phtml

After 1.4CE/1.8EE:

frontend/base/default/template/page/page.phtml

Some extra reading on theme hierarchy from the Magento KB:

http://www.magentocommerce.com/knowledge-base/entry/magentos-theme-hierarchy#3.2

answered Apr 28, 2013 at 14:36
1
  • 1
    But please don't places files in the base template unless you're an extension developer. Put them in your own package/theme. Commented Apr 28, 2013 at 14:37
0

Your solution is correct (I've just tested it). Make sure you created your template file in the correct directory. It should be placed here:

app/design/frontend/[package]/[theme]/template/page/page.phtml

And flush Magento cache.

answered Apr 27, 2013 at 14:11
0

You are heading towards right direction. Cache refresh, already purposed, additionally, turn on the magento development mode to make sure your block has been added to the page.

answered Apr 28, 2013 at 16:22
1
  • Always welcome. Commented Apr 28, 2013 at 21:10

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.