Jump to content

Reusable Templates/Fields


pideluxe
 Share

Recommended Posts

I often thought about the ability to provide an easy way to install themes like in e.g. Wordpress. Reading the docs about template files, an idea came to me, how this might be possible: Use another layer between template, template files und the connection to the fields.

The workflow would be:

  • Declare the use of fields in the template file with their type
  • When creating the template in admin, the declared fields are read in and the user could connect it to his own fields
  • ProcessWire must handle the cloning of the reusable fields on runtime

Does this sound serious to anyone? Or do you think this is not possible, achievable or desirable? I know it adds kind of a templating language and another level of abstraction, but for the goal of easy templating this may be not a major drawback, thinking of small business websites or blogs.

Using this for reusable template themes, would bring  a lot more attention from less php-skilled user and help spread ProcessWire in general. Designers could built their themes and an average user could use that to built his own site.

Link to comment
Share on other sites

I'm not sure that I totally understand the details of what you are suggesting, but as a concept I think that it's a fine idea. However the "reusable template themes" is not really the target audience of ProcessWire. Though maybe someday our audience will include this group too. But for now I think it's best to maintain focus on what ProcessWire is designed for. But I'd certainly be supportive of anyone that wants to pursue projects like this. I also think that our current site profile system will lend itself well to reusable templates for when a theme shop takes interest in developing them. The primary distinction is that PW site profiles are starting points, not themes to swap in and out. 

  • Like 1
Link to comment
Share on other sites

I think this sounds like a good idea and might also make exchanging stuff except complete prebuilt templates easier.

There was a discussion about continous integration in this thread and I think mindplay.dk is working on it. If we have a reasonably stable thing here, I think it wouldn't be too hard to have something like a "migrations" file including all needed changes to "install" a template.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...