Search

A new Extension, “Entity Diagram” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

An entity-relationship diagram is a great way of representing data models in a diagram. One can display a list of tables (entities), the fields in each, and draw relationships between the two; optionally showing the order of relationships (one to one, one to many etc.).

Entity Diagram is an attempt to produce a diagram representing a Symphony build.

Entity Diagram

It doesn't quite show relationships in the traditional way, purely because mapping the lines between sections would be rather tricky with HTML and CSS (although a VML/SVG diagram could work).

The diagram shows all Sections and lists all fields within each. Hover over a section-linked field to highlight the related fields in other sections. By ticking the checkbox you can see the internal IDs for all entities, which is useful when developing bespoke events/data sources.

If you frequently collaborate with others, need to hand over a project, or want to explain the data structure to your client, the idea is that this diagram might make your life a little easier.

This is so f*ing sweet. I've been doing this by hand and often wondered if it might be replicable from within the system. And then, as always, somebody kick-ass comes along and does it.

thats awesome Nick... Is this a self project or for Airlock? or a bit of both?

A bit of both. It's a personal project, but has had the input of the other developers at Airlock. It hasn't arisen from a direct client requirement, but it's the sort of thing we'd find useful internally, when discussing projects within the team.

Mostly it was a personal challenge — to tinker with section managers and fields, and dusting off my JavaScript to write the logic to stack up blocks in a tighter layout as possible.

Glad you guys think it'll be useful!

Great stuff, Nick. Only thing that seems odd is when the field labels are longer than one word they get handle-ised and capitalised: i.e, Title override becomes Title-Override.

Works a treat though so thanks for taking the time.

Yes Nick its definitely useful, when part of a team at least.

Im curious to know what kind of a workflow you (and Airlock) have when working with Symphony. When you start a new project on localhost do you do everything there and then upload to a staging server or you go through the two systems, periodically updating each as you progress?

If you're on two systems, how do you keep databases in sync? What's your text editor? Coda? Textmate?

many thx.

I'm also digging this extension!

ALREADY used this extension to demonstrate the basics of data modeling to some colleagues.

This is awesome Nick! Thanks so much!

Indeed. Awesome work, Nick!

This is great!

Nick FTW.

Updated to 1.1.

  • Fixed a bug with the JS row/column fitting
  • Field labels no longer use handles with CSS capitalisation. Field label value now used.

Entity Diagram v1.2

  • Fixed a bug related to Select Box Link field v1.7+
  • Entity Diagram now appears under the System menu

This has only been tested with v1.8 of the Select Box Link, but I don't see why it shouldn't work with older versions. Zip attached to the top of the thread.

Here's an example of a relatively large site. Highlighted are the fields related to the field in the top left.

Entity Diagram

Very cool, good job!

Hey, Nick, is there any reason the entity diagram wouldn’t be showing up in a Symphony install using the latest Github integration branch? It seems to work fine for the official 2.0.2 release.

Yep. Because I’ve yet to fix the ‘add to navigation’ code. I know this code is going to change again in the next Symphony release, so I saw little point in the interim.

You can still get to it with the same URL:

/symphony/extension/entity_diagram/diagram/

Ah. Thanks, Nick. That works. Hopefully the change to the ‘add to navigation’ code will be less clunky.

I hadn’t clicked on the “Show section and field IDs” checkbox before. (I’m not sure why. It begs to be clicked.) I’ve got to say, this feature alone makes this extension a must have. It’s great to have all the fields and sections mapped to their ID numbers. It makes understanding the database structure much easier. Thank you for this!

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