Skip Navigation

[Resolved] using a shortcode as a view argument

This support ticket is created 3 years, 5 months 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by lesT 3 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#2155821

I have :
[wpv-conditional if="( '[urlparam param= 'marker' ]' ne '' )"]
[marker_toPole min= '[urlparam param= 'marker' /]']
[wpv-view name="Pilots-Display-Marker" min= '3129' max= '3229' band= '100']

produces the correct result because I have hard-coded the value (3129) output by [marker_toPilot] into the view min argument
[marker_toPole] is registered with the Third-party shortcode arguments (under Toolset > Settings)
however, substituting '[marker_toPole min= '[urlparam param= 'marker' /]']' for '3129' does not work, it appears to be a syntax error

the final two statements of [marker-toPole ]are:
$a = intval(distance($pole_lat, $pole_lon, $latitude, $longitude, "M")); // calculate range Marker toPole
return $a;

thanks for your help!

#2156243

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

It seems that the issue here is due to the nested shortcodes you are passing to view's shortcode argument.

What if you try to get the urlparam "marker" within the shortcode [marker_toPole] you created using the $_GET['marker'] or $_REQUEST['marker'] and then pass only the [marker_toPole] as shortcode attribute.

Will that work?

#2156361

My issue is resolved now. Thank you!