Skip Navigation

[Resolved] View dynamic attribute shortcode (2)

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by GuidoP2150 4 years ago.

Assisted by: Waqar.

Author
Posts
#1579247

I have difficulty to reply original post: https://toolset.com/forums/topic/view-dynamic-attribute-shortcode/.

Can set as open or merge with this post? Please, set the next reply to private.

Thanks!

#1579393

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

I've read the background information from the other ticket and we can continue on this new ticket.

I'm setting your next reply as private so that you can share temporary admin login details.

Please also share the page where both these views can be seen in use.

regards,
Waqar

#1588495

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for sharing the admin access and further details.

For passing on an ID or any other information from the current post to nested level views, you can use the shortcode attribute feature:
https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/

For example, in your content template "Startup Check Challenges Tab" which is starting calling the series of nested views, you can update the view's shortcode to include current startup post's ID in an attribute, for example, "startupid":

Current:


[wpv-view name="dashboard-challenges-get-program"]

With new shortcode attribute:


[wpv-view name="dashboard-challenges-get-program" startupid="[wpv-post-id]"]

That passed on ID value can then be used inside the view "Dashboard Challenges (get program)", through the "wpv-attribute" shortcode:
( ref: https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-attribute )


[wpv-attribute name='startupid']

The same value can then be passed on again to the further nested view "Dashboard Challenges", like this:


[wpv-view name="dashboard-challenges" startupid="[wpv-attribute name='startupid']"]

Using the same method, you can keep passing this value, until you've reached the view "Check Startups".

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1589269

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.