문제

I have a file in my package myPackage/default/template/testpage/test.phtml with something like:

<?php
echo 'Test'
?>

How can I call it as a block in a cms->page?

I tried to use {{block type="page/template_testpage_test" template="testpage/test.phtml"}} but nothing happens. How should I call the type=A/B?

Thanks

도움이 되었습니까?

해결책

The basic block for templates is core/template. So the CMS code in your case is

{{block type="core/template" template="testpage/test.phtml"}}

But in order for this to work, you have to add the block type core/template to the whitelist in System > Permissions > Blocks

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top