palacios000 Posted January 29, 2015 Share Posted January 29, 2015 Hi. What does the "Context" option do for a field type? Are there any advantages? Maybe performance? Thanks a lot! Link to comment Share on other sites More sharing options...
kongondo Posted January 29, 2015 Share Posted January 29, 2015 (edited) It allows you to save settings for a field on a per template basis. Let's say for a template called 'flats' you want the label of that field to be 'Available'. On another template, , called 'agents', you can reuse the same field but give it a different label, e.g. 'Premium'... You can also edit context settings when editing the list of fields when editing a template. Hover your mouse over the label of the field and an arrow will appear. Click on that, it opens a modal and you can set 'in context' changes there. Recent changes to PW (can't remember version) introduced the ability to save lots (all?) field settings on a per template basis. This is a really powerful feature, like many others in PW Edited January 29, 2015 by kongondo 3 Link to comment Share on other sites More sharing options...
kathep Posted January 29, 2015 Share Posted January 29, 2015 Hi @palacios000! What @kongondo said. I use the 'context' dropdown for two things: 1. to make my backend template forms look nice and compact, and 2. to reduce the amount of fields I need to use and create. I will explain this one because it is probably the most useful. So instead of having these fields and titles in these templates: Template: Houses with fields: house_address (label: House address) house_available (label: House available?) housing_development (label: Housing development) Template: Flats with fields: flat_address (label: Flat address) flat_available (label: Flat available?) building_name (label: Building name) Template: Mansion with fields: mansion_address (label: Mansion address) mansion_available (label: Mansion available?) mansion_name (label: Mansion name) I can do this: Template: Houses with fields: address (label: House address) available (label: House available?) name (label: Housing development) Template: Flats with fields: address (label: Flat address) available (label: Flat available?) name (label: Building name) Template: Mansion with fields: address (label: Mansion address) available (label: Mansion available?) name (label: Mansion name) I use the same three fields for slightly different things on different templates. This is helpful because when I'm writing code where, say, I want a list of all properties, I only have to call three fields. Does this make sense? 6 Link to comment Share on other sites More sharing options...
palacios000 Posted January 29, 2015 Author Share Posted January 29, 2015 Thank you all! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now