Search

I've started an extension and will need to save a few small custom values against each Symphony page such as on or off, 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?

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.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details