want to call one phtml file in another phtml file using anchor tag

前端 未结 6 835
迷失自我
迷失自我 2021-02-06 16:47

I\'m using Magento.

I want display and call one phtml file as a link in another phtml file…

I have the new.phtml file on t

6条回答
  •  佛祖请我去吃肉
    2021-02-06 17:32

    You can not call directly one phtml file to another phtml file.

    But there are two way to call your phtml file either create one controller and create one action and call action from your anchor tag or create one cms page which call your phtml file.

    if you create one module, so in your layout file something you can write

    
        
            
        
    
    

    Or you can directly put this code in your cms page content area

    {{block type="catalog/product_new" template="custom/newproductpage.phtml"}}
    

    and in anchor tag give cms page link.

提交回复
热议问题