This may be a very stupid question. I made a new page in Magento and I want to make a link to the page on my Magento homepage, but I dont know what the link url to use for that page. The url key for my page is over-ons My base url is: 127.0.0.1/html/magento/magento I cant seem to find out how to get to my new page. How do I link this to the home page? I've seen a tutorial on the official magento website itself and it said you have to make a new category but that doesn't seem right for such a small thing. How do I get to my new page?

有帮助吗?

解决方案

You need to add this in the content field of the homepage in CMS->Manage pages

<a href="{{store _direct="over-ons"}}">Over Ons</a>

This will build the correct url independent of your base url.

其他提示

If you mean putting a link in the main navigation, then unfortunately a Category is probably the only way to do it without a custom module observer. If you want to do it properly by customization, Marius has an excellent answer here.

Magento's navigation building code is an ancient relic from around Magento 1.0, and mainly just loops through the categories to build tiered out navigation. You can take advantage of this by giving a Category and a CMS page the same short url, as Magento processes the CMS router after the Category router, meaning that the link to the CMS page is the one that will be honored.

EDIT: Cleared up the wording on why this should be done.

许可以下: CC-BY-SA归因
scroll top