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

    First of all I hope everyone had a great Christmas! Now that the holidays are over I continued working with my MODx snippet and I have a question.

    I created a custom table and my classes are working fine. I can even add, modify and delete entries in the manager. Is there a possibility to create a page from every entry in the database? Like a normal page ( like www.modx.com/class/entry-123/ )? Or do I need to add them to the documenttree?

    Best regards,

    Rogier
      • 3749
      • 24,544 Posts
      That kind of defeats the purpose of creating the custom table. wink

      You can create a custom snippet that gets the data from the DB and uses a Tpl chunk to display the data. It will look just like a real page, but you won't have the overhead of another entry in the site_content table.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 25586
        • 105 Posts
        I understand, so instead of /entry-123/ i just use .com/entry?id=123 and use htaccess to turn it into a normal link? I have to dive in to modifying the .htaccess file because I never done it before

        Is it difficult to change entry?id=123 tot /entry-123/?

        Thanks for pointing that out Bobray!

        I'll keep you guys updated!