Jump to content

Recommended Posts

Posted

The first time you create a field, there is an info tab which says 

This field is not currently in use by any templates.

It would be real time saving at that point to select the Templates which can use the new field. Otherwise we have to save  the field ... browse to Templates ... find your template ...click it and add and reorder it there.

Posted

I think more direct workflow would be from template - possibility to create a new field and attach it directly to a template. I mean you pretty much always want to order the field, so you need to be on template view anyways.

  • Like 6
Posted

I think more direct workflow would be from template - possibility to create a new field and attach it directly to a template. I mean you pretty much always want to order the field, so you need to be on template view anyways.

Maybe the way is a modal dialog on the templates edit screen that accesses the complete field creation and configuration options and as soon as you save and the modal closes, the field is added to the ASM of fields in the template?

Otherwise you could be potentially stuck with needing to go back and edit the field settings.

  • Like 2
  • 4 months later...
Posted

Still thinking this is badly missed from PW.

When creating a field, it's natural to want to assign it to a template.

@apesia is right that we'd need to consider the field order.

Posted

Still thinking this is badly missed from PW.

When creating a field, it's natural to want to assign it to a template.

@apesia is right that we'd need to consider the field order.

Ask and you shall receive!

Check out today's dev commits :)

https://github.com/ryancramerdesign/ProcessWire/commits/dev

"Add Adrian's ProcessTemplateFieldCreator for quick access to create new fields in ProcessTemplate."

  • Like 6
Posted
Add Adrian's ProcessTemplateFieldCreator for quick access to create new fields in ProcessTemplate. Add new InputfieldIcon module, which enables visual selection of font-awesome icons. You'll see this used in both ProcessField and ProcessTemplate (advanced tabs). I figured there will be plenty of other use cases for this too, like the icon selection in AdminThemeReno and SystemNotifications modules, among others.

Agh. Just tried an upgrade and hosed my site. I'll have to come back to this.

So it sounds like we can setup new fields when creating a template? What about the opposite - assigning a template when creating a field? 

Posted
Agh. Just tried an upgrade and hosed my site. I'll have to come back to this.

Sorry to hear - hope you get it sorted quickly!

So it sounds like we can setup new fields when creating a template? What about the opposite - assigning a template when creating a field? 

Correct - at the moment the new functionality is for creating new fields from the template config. As we discussed above - not sure how useful it would be to have the ability to assign fields to templates from the field config - if you want to assign to multiple templates at once, how would you order the field in all those new templates. Maybe it would be possible if you were adding the field to just one template -  a modal could maybe handle this. Any thoughts on how to practically achieve what you are looking for from a UI perspective?

Posted

I think slowly I get why Joss suggested in another topic a seperate Processpage, which sole purpose is stiching together fields and templates. 

Here is a very very rough start on the idea of batch template confguration:

https://processwire.com/talk/topic/8406-set-multiple-templates-role-access/?p=81711

There is a lot of thought that needs to go into doing this properly - at some point (if no-one beats me to it) I would like to build a really comprehensive tool, but not sure when I will get to it!

Posted

Sorry to hear - hope you get it sorted quickly!

Time machine to the rescue :)

Correct - at the moment the new functionality is for creating new fields from the template config. As we discussed above - not sure how useful it would be to have the ability to assign fields to templates from the field config - if you want to assign to multiple templates at once, how would you order the field in all those new templates. Maybe it would be possible if you were adding the field to just one template -  a modal could maybe handle this. Any thoughts on how to practically achieve what you are looking for from a UI perspective?

100% of the time, I'm just applying the field to a single template but this sounds like an interesting challenge.

I won't have a chance next week but shortly afterwards, I'm definitely interested in wireframing up some options.

Would they be best uploaded here or PM'd to you or Ryan?

Posted
Would they be best uploaded here or PM'd to you or Ryan?

That would be great Peter - I think post them here - see if we can get input from everyone.

Posted

I would imagine something more like this, where one could drag and drop from the fields list to the templates. 

The fields are only there as list to choose from. Click on the title could open a modal edit. Maybe two buttons on the bottom, to add Fields / Templates to it.

Edit: It's just so cool to have this mockup build faster than I could have in some design software.

post-874-0-09188800-1421417815_thumb.png

  • Like 9
Posted

Mass editing view! Clicking field name on left would open field settings in modal - clicking field name on right would open template context field edit in modal.

Interesting concept! It also shows nicely, that same field can belong to multiple template (ie. field is independent from template).

  • Like 3
Posted
I would imagine something more like this, where one could drag and drop from the fields list to the templates. 
 
I love this idea the ability to drag all fields into any template all on one screen.
 
Clicking field name on left would open field settings in modal - clicking field name on right would open template context field edit in modal.
 
Also great :)
  • 3 weeks later...
Posted

Check out the new feature Ryan just committed to dev - on the field's new Action tab you can "Send fields to templates". Then on the next screen you get to order their positions on each of the templates they were just assigned to - pretty cool!

  • Like 2
Posted

Check out the new feature Ryan just committed to dev - on the field's new Action tab you can "Send fields to templates". Then on the next screen you get to order their positions on each of the templates they were just assigned to - pretty cool!

Sounds great. 

Just out of interest, when something is committed to the Dev branch, is there an additional step(s) needed before it's available for the masses? My CoreUpgrade module isn't showing any updates yet  and I'm running 2.5.17.

Posted

This is such a cool feature and beautifully implemented.

I'd love to eventually see something like this where you can

  1. check multiple templates field could be applied to
  2. ...which reveals the list of fields incl. sorting 

I guess its a mix of @Ryan current work and @LostKobraKai idea earlier in the thread.

post-1166-0-48183600-1423047687_thumb.jp

  • Like 3
Posted

I just submitted a PR to extend Ryan's new "Send to Templates" functionality on the Action tab to be an "Add/Remove fields from templates" function.

Not sure if he will go for it as is - he might have something grander planned, but it was a quick addition:

https://github.com/ryancramerdesign/ProcessWire/pull/902

There are some screenshots in one of the comments that shows how it works. Would be curious what others think of how it works if you feel like trying it out!

  • Like 1

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
×
×
  • Create New...