Building an extension: saving settings per page
This is an open discussion with 3 replies, filed under Extensions.
Search
Separate table or config — in my opinion extensions should never touch Symphony's core tables.
I agree with Nick. Never modify Symphony score tables. Create a separate table and use a foreign key.
Good to have that answered. Thanks.
At the moment I'm thinking I'll create/read/update/delete this table using my own simple SQL queries as and when the Page admin page form is submitted by using the relevant delegate and the page ID. Is that okay, or am I missing something within the Symphony framework I should use to update this table?
Edit: looks like there's quite a bit in the MySQL class to use. Will give it a go and see what happens!
Create an account or sign in to comment.
I've started an extension and will need to save a few small custom values against each Symphony page such as
on
oroff
, with the setting of these values by the user likely done on the main Page editing page. The fields themselves are more or less in place, but I have a question on storing the values.Should these values be stored in the
sym_pages
table in new columns specific to my extension, or should there be a separate table for the extension?Are there any existing extensions in particular that I should look at for examples of how to store config relating to pages in the database?