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

Url mapping? 
 
frontier
Member
 
Total Posts:  41
Joined:  2008-04-17
 

How are url’s mapped to modules?

eg. sendfriend/product/send/id/7/cat_id/20/
How does the system know to look at layout/sendmail.xml?
How does the system know to run /app/design/frontend/default/default/template/sendfriend/send.phtml?

I want to make a similar extension - well actually just an alternate rendering of a product view with a different template - this is closest I can find. (in that I know the product id is there) Ideally though I would like to extend the catalog module or create a totally new module, but I just can’t figure out how to register a page url and get it to run?

eg. in layout/catalog.xml if I could just add a
<catalog_product_view2>
<reference name="root">
<action method="setTemplate"><template>page/myspecialpage.phtml</template></action>
</reference>
etc....
</catalog_product_view2>

and have this run my view2.phtml instead of view.phtml
with the product registered or product id passed in the url as per view (probably just inherit from view class?)
then that would be all I need.

 
Magento Community Magento Community
Magento Community
Magento Community
 
frontier
Member
 
Total Posts:  41
Joined:  2008-04-17
 

Ahh ok, I got catalog_product_view2 to work, it’s just by naming convention.

But I would still like to know how the rewriting for the regular <catalog_product_view>’s /category/product_url_key.html gets mapped/updated?

 
Magento Community Magento Community
Magento Community
Magento Community
 
nathus
Sr. Member
 
Total Posts:  93
Joined:  2008-12-13
Twin Cities, MN
 

How did you get it to work?

Do you mean you want to http://www.example.com/catalog/product/view2/id/XXX ?

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