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
That kind of defeats the purpose of creating the custom table.
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.
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!