Jump to content

Auto-detect & create fields from new template file


Recommended Posts

Posted

Just popped into my head, maybe it's already been done?

I create a new template file, copy all of my HTML into it, and add a bunch of comments like this:

<!-- field:page:textarea:TinyMCE -->

<!-- field:page:images -->

...and then PW assigns those fields to the template automatically when I tell it to make the new template out of an existing file. Maybe even puts basic PHP in after the directive comment. Crazy idea?

Posted

Nice idea! This would be nice way to share templates and their fields. Actually this reminds me how Perch works: http://grabaperch.com/.

I think only problem here is that PW doesn't have write privileges there, so it cannot replace those comments with php. Not sure if there is any way around it.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...