I'm trying to setup a table into table view which are set up in a "one-to-many" relationship, where a county can have several cities.
I have managed to set it up (hidden link ) and when I enter the name of a city into the search field it is found. hidden link.
Now I could also search for the county name and this would be achievable if I entered the name of the county into the city's post content ( hidden link - hidden link )
The idea is that I want the table structure to look exactly as in this screenshot ( hidden link ) where I have a header row with the county name and beneath the corresponding cities.
Here's the page for it :: hidden link
I can give you access to the admin area if you'd like
Hello. Thank you for contacting the Toolset support.
Well - if you have one to many relationship setup, you can display the such output using nexsted view. Where you need one view to query your parent post type and one view to query your child post type.
If you can share the access details and for what relationship you want to display such results, I would be happy to configure it for you. Please create a test page and two views as said above and share access details.
Well - I would like to know here do you need a search function as well with your view?
As - if you use nested view as I said where you need one view to query your parent post type (county) and one view to query your child post type (city).
If we use nested view the search function should not be used as the child view that queries (city) will be added to parent view's loop editor.
If you need search function, then nested view will not work here.
I would like to be able to search for both a city and a county in the search box - hidden link
I'm not sure which method I'd prefer - but the end result I'd like to look like this hidden link and to be able to search for both a county and a city.
Do both methods accomplish the same result, meaning:
1. has this layout - hidden link
2. I'm able to search for both a county and a city?
One more thing: would it be possible to hide those counties which are empty when doing a search ( hidden link ) via a parametric search conditional or something?
And we are catching the shortcode attribute "county" within the view "city-belongs-county" as given under that is placed just after the shortocde [wpv-items-found]:
=> hidden link
I noticed you removed the "[wpv-no-items-found]" from the loop editor which is good because there're no multiple 'no item found' messages when searching for a city.
In case however that someone enters a city which doesn't exit at all, would it be possible to have a message displayed? ( hidden link )