1st View:
[wpv-view name='get-countries-ids']
which returns a result like this: "id, id, id, id" (there can be any number of ids). ex: "9, 8, 7, 6"
2nd View:
[wpv-view name='get-city-names' countriesids="9, 8, 7, 6"]
returns the list with the name of the cities that have the field "country_id" with one of the values of the parameter "countriesids" passed in the shortcode
Both views work perfectly.
But when I put it like this, it doesn't work:
[wpv-view name='get-city-names' countriesids="[wpv-view name='get-countries-ids']"]
What happens? can't I use a shortcode inside another?
Details:
- the result of the 1st view is correct, always ids followed by a comma;
- I need it to be passed as a shortcode parameter only;
- I'm using the views plugin 3.6.3 with pure code;
Hello. Thank you for contacting the Toolset support.
Have you check-mark the checkbox "Disable the wrapping DIV around the View" for the view "get-countries-ids".
You can find this "Disable the wrapping DIV around the View" just above "Output Editor" section. Does that helps?
if you still have issue, please share problem URL and admin access details and I'm happy to look at whats is the issue.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Normally, the nested shortcodes should work but your case is bit complicated where you have nested shortcodes and view shorcodes has another nested shortcodes as view argument that fails to render correctly.
Fortunately, I've workaround to offer you.
Can you please check now: hidden link
This is how I've added the view now to your content template:
=> hidden link
Where I've removed the argument idspost='[wpv-post-id]'
I've added the following view filter to filter the "campos-colecoes-por-produto" view and added the filter at "Custom Code" section offered by Toolset:
=> hidden link
What we have done is removed the query filter for custom field 'cc-produtos' that is set to filter by shortcode attribute t idspost='[wpv-post-id]' and now we added that filter using wpv_filter_query hook.