We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36420
    • 9 Posts
    Hi There

    I created new component for MODx to manage users posts. Previously I created a button where the user clicks it and a window pops up to enter the details for the new post. Unfortunately the client demanded a lot of fields to be entered, so the window got larger on smaller and low resolution screens.

    The idea now is to create a new page to enter the post details.

    I added another action "controllers/add" see the attached image, and I added a sub menu "Create New Post" and assigned the newly created action to this sub menu.

    and also I created a php file add.php "See the attached image" and in the index.php inside the mgr folder I put an if statement to check if "action=add" is included in the URL.

    action=add is added as a parameter in the sub menu. if the action is included in the URL, the add.php inside the mgr folder will be included otherwise the default page for the component will show up.

    this is seems to work, but I was wondering if there are other ways to do it in a nice an neat way, for example when creating new user.

    Thanks in Advance

    devteam@moon
      • 28215
      • 4,149 Posts
      splittingred Reply #2, 15 years ago
      That's how I do mine. This becomes a bit easier in 2.2, but that's generally how it's done.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 36420
        • 9 Posts
        Thanks for the fast reply

        You guys are super awesome.