Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

call one phtml file in another phtml file using anchor tag
 
bhavikshah237
Jr. Member
 
Total Posts:  3
Joined:  2013-04-25
 

i am new to magento....

want to call one phtml file in another phtml file using anchor tag??
means i want display and call one phtml file as a link in another phtml file…

i have the new.phtml file on the home page. on that i put one link CHECK ALL which display all new products as category page..its looks like category page. for that i create another phtml file named newproductpage.phtml which has same code of new.phtml. now i try to call this newproductpage.phtml file @homepage as CHECK ALL link for that i write this code.... 

<a href="<?php echo $this->getUr('newproductpage.phtml')?>">CHECK ALL</a>

but its not working.... anyone have idea for this??/
rply as soon as possible…

thnx..

 
Magento Community Magento Community
Magento Community
Magento Community
 
prateekgupta
Guru
 
Avatar
Total Posts:  541
Joined:  2010-06-04
India
 

hi,

You can create a static block.. include that phtml file into that.. and then include that static block in your file.

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('your_block_identifier')->toHtml() ?>

There will be a direct way too .. will find that and let you know..

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top