Search

A new extension, "Scaffolds" 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.

What is Scaffolds?

Scaffolds allows you to quickly create Sections from a file. Section definitions can be exported and then imported into other Symphony installations using JSON. Definitions can be saved and reused on other Symphony projects to save you time recreating those common sections.

This looks awesome. I took a pass at something like this a while ago. Two stumbling blocks for me that I'm curious about:

  • What do you use as a unique identifier for extension-based fields?
  • Does this support linking fields, and if so how?

Scaffolds updated to version 0.4 on 10th of August 2011

Changelog

  • Now supports linking fields (uses the name of the linked field rather than the ID)

Check the wiki for more info :)

@ashooner sorry it took so long:

What do you use as a unique identifier for extension-based fields?

The field's extension type handle, eg. taglist, selectbox_link

Does this support linking fields, and if so how?

It does now! It uses the text instead of the ID's. So if you have a SBL linking to the News section with a field called Name, the definition would store this as:

"Related": {
    "type": "selectbox_link",
    "related_field_id": [
        {
            "optgroup": "News",
            "value": "Name"
        }
    ]
},

It still relies on you creating your sections in the correct order though, but I think that's a pretty good compromise :)

There are some example definitions in the repo if you want to get a feel for the extension quickly.

Scaffolds updated to version 0.5 on 3rd of February 2012

  • Add support for exporting/importing the Section essentials (name, navigation group, backend visibility). Definition files now have a slightly different output format (old formats still supported). Implements #4 & #5
  • Fixed exporting of some Select values, #2
  • Exported definitions are now pretty printed
  • Small Javascript cleanup

Hi Brendo. The export button doesn't seem to work form me. Nothing seems to happen. I'm trying to move a section between two 2.2.5 installations. Any ideas? Where should the exported file end up?

You should be prompted to download the file in your browser. Check your JavaScript console for errors, maybe something is going wrong there.

What browser are you using? Scaffolds uses the FileReader API that's not available in all browsers

I'm using Firefox 10.0.2 (and have tried Chrome 17.x).

In the console I get this:

Pastie link

Which weeks OK as it ends [HTTP/1.1 200 OK 214ms]. Nothing happens though :-(

What's the response of that file? It's a bit odd, I'm off on a cruise in 12 hours, so I won't have time to look at this for the next week unfortunately. I'll take a look when I get back if the issue still persists!

BTW, if the response is JSON object, you should be able to save that as .json file to use for importing. It's probably just the actual download functionality that's broken (which was relying on a bit of a sneaky hack to work anyway)

OK. Thanks. Have a nice cruise :-)

I'm curious about this extension. It seems like it might be a solution to the problem of modular installs. Particularly if it's expanded to handle datasources and events. However, I can't figure out how to use this. When I install the scaffolds folder in extensions and enable it in System > Extensions, I don't then see any way to use it. I checked in System > Preferences, Blueprints > Sections, and on individual section pages, but don't see any way to export and import sections. Little help?

If I can get this running on my localhost, I will look at the implementation and see whether I can help with extending it for datasources. Just need a kick-start here, I guess.

When you create a new section, there is a little green button at the top right for import, and on existing sections, and import/export button.

This relies on browser technology as stated by Brendan earlier, maybe try a different browser?

A sidenote on the concept of modules, discussion here and here.

I tried chrome and firefox (as well as the chromium in my Debian install) and still don't see that button. Seems like it's not being installed properly, but I'm not getting any obvious errors and it shows as enabled.

This is a great extension for creating new sites with similar structures. Especially if data-source & events could also be imported/exported along with sections.

I am also thinking of potentially using-scaffolds for deployment purposes. If I understand correctly one can import several 'scaffold' files into one section and these would be merged together. And if there are some over-riding fields these would not be over-written.

So technically I should be able to export from my local development machine - import the section/datasources[when support is complete or manually update it] into a staging environment, and this should work without any issues (as long as the related fields/extensions are installed.

Yeah that was the intention :) The concept was originally to make migrations a more 'friendly' experience and to save commonly used sections for reuse in other sites.

Doing so with SQL usually involves ID's, and this is not flexible between systems, so just storing the definition and triggering the javascript seemed like a good solution (it's just as if you typed it out really really fast :P).

Datasources, Events and Pages are all on the roadmap. I need to give this extension some TLC as there has been a couple of bugs posted to the tracker of late.

Thanks for the feedback :)

Thank you. Thank you. Thank you!

@brendo would be great. To be honest we're now a growing team and looking to implement something like git to manage files and stuff, and that would have left the database exposed a bit when it comes to updating sections etc.

Not sure if it would make sense to you if this was to be used in conjunction with Nick's DB_sync. Meaning I would import the sections on my Staging/local environment, with a db-cloned off live then copy the sql queries generated and run these on our production database. And then sync the files between my staging and production.

Was also wondering if there is plan to have a 'Scaffolds page' in the backend that would enable upload into multiple sections / data-sources.

PS would be willing to contribute where/if I can.

I just began to realise the potential of this extension. Super!

Thanks, @brendo!

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