0

How do you create a custom router for two related pages?

About us and person page. The URL structure would be like so http://example.com/about-us/ and http://example.com/about-us/john. There will be multiple people, so the people's page URL can't be hardcoded i.e. about-us/mike, about-us/jane.

2
  • Why you don't create a cms page with a number of peaples that you want Since the content is different ?
    – PЯINCƎ
    Commented Jul 17, 2017 at 12:17
  • Because the number of people might/will change. And the pages are created from records in the db @Prince
    – arnolds
    Commented Jul 17, 2017 at 17:09

1 Answer 1

0

you need to study below post for same

you need to create custom router for that

<default>
<web>
  <routers>
     <myextension_myrouter>
         <area>frontend</area>
         <class>Mynamespace_Myextension_Controller_Router</class>
     </myextension_myrouter>
 </routers>
</web>

More info:- http://inchoo.net/magento/custom-router-in-magento/

4
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – PЯINCƎ
    Commented Jul 17, 2017 at 12:29
  • inchoo never change it's link Commented Jul 17, 2017 at 12:30
  • 1
    Links are good, but they should never be the only piece of information in your answer ! It was necessary to learn the SE policy before joining it .meta.stackexchange.com/questions/8231/…
    – PЯINCƎ
    Commented Jul 17, 2017 at 12:36
  • This really doesn't answer the question. I already understand how to create a custom router, but not for this particular case. I've been reading the article, but most of it flies over my head. Thank you though.
    – arnolds
    Commented Jul 17, 2017 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.