DevPack Presets?

For the blog DevPack I am working on, I have pre-defined page layouts (basically copying Alloy) and will be enabling the user of the DevPack to specify the format of each post shown in the layout. There can be up-to three different formats of a post in a layout. Each of these formats is a drop zone that can be setup to display the post how the user wants.

It would be useful to be able to include some default format container presets for that could be used as a starter for 10. These to be available inside the DevPack to use after installing it.

So the preset could be dragged into the drop zone and then all the controls for the container and its contents would be available as normal.

Just to make sure I’m understanding you correctly—are you saying you’d like to specify child components that are automatically added when dropping a component onto the page?

For example, if you had a Blog Post component, it could automatically include a Blog Post Title, Blog Post Date, and Blog Post Body inside it when added.

Is that the kind of behavior you’re looking for? :slight_smile:

I wasn’t exactly looking for automatic adding (I don’t think?), it was more to have a container that would include different components for a design for a post, for example in the image below, there a two cats. Each of those is a dropzone with in this case is a common format. The preset would define the layout for that format and then the preset could be dropped into the dropzone to define how it is shown.

having a preset or selection of presets, would mean the the user could be up and running with a blog fairly quickly without having to do any design work initially.

The preset container and components within the container would contain a default image which will be substituted by the blog DevPack code and text areas that can contain substitution keywords, e.g.:

  • {DATETIME}
  • {CATEGORY}
  • {TITLE}
  • {SUMMARY}
  • Possibly more to come.

The above would be substituted with text from the saved post metadata.
By having components such as image, Text, TextArea in the Preset, the user could modify them to how they want their post displayed, with all the power of Elements component properties.

The formatting above isn’t quite right on the above example as the Summary is running off the bottom of post container (and this is from the standalone not the Elements published page).

This is the configuration of a blog listing component. It shows the layout that will be for the first and subsequent pages. The drop zones are defined for A and B in the first page and A, B and C in the second page. So whilst the layout is predetermined, how the post is displayed in any of A, B or C is up to the user.

At the moment, I am making changes to generalise the code to allow for up-to four separate blogs (A, B, C or D) to be used on a website (no reason why it can’t be more).

This is the blog configuration component that has to be present on every page and selects the blog you want on this page (in this case A). I am not planning on handling having more than one different blog on a page.

Once, I have got it more stable, I will share it with you, if you would like?