Every site on V4 is fed data from GetSetPro. That data may include multiple staff members, multiple locations, and eventually multiple subgroups. How do you target and insert data specific to, for example, the first name of a team member in a location when the site has data from multiple locations?
In V3 we had a list-team or list-location module, but these modules require additional work in filtering out the irrelevant team/location posts by applying categories which had to be manually assigned. Being forced to use these list modules every time you need to insert GSP data is too limiting, what happens if you want to insert data specific to a team member or location that the list module doesn't support?
In V4, by default, all data is available to the entire site. If you have a multi location site with multiple team members in each location, should you use a (team get='first_name') dynamic tag, V4 will just get the first team member it can find in the first location it can find. It determines what is 'first' by the order of the posts on the location/team post pages.
The context can be set at any level:
- Site
- Page
- Childpage
- Component
- Nested Component
- etc..
- Nested Component
- Component
- Childpage
- Page
At whatever level the context is set, any child page/component will inherit that context.
For example imagine at the page level, you set the context to a specific location. Should you then use a (location get='name') shortcode it will display the location name of whatever location you selected in the context. If in a section component nested inside that page you then set the context to a specific team member and insert a (team get='first_name') shortcode, it will insert the first name of that team member.
The GSP context field will always show you what context is being inherited. You can also reset the context at any level, you are not locked into whatever context the parent is set at.
Note that all team/location pages and any team/location that appears in a list-team/list-location component will have the GSP context set automatically, not need to manually set the context.