Skip Navigation

[Resolved] breaks a second tier shortcode

This thread is resolved. Here is a description of the problem and solution.

Problem:

I am trying to build a map with leaflet plugin, but the shortcode breaks the plugin shortcodes.

Solution:

Leaflet plugin does not support shortcode in shortcode feature.

Relevant Documentation:

This support ticket is created 5 years, 10 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
- 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/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by romanB-3 5 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#1194003

Hello,
I am trying to build a map with leaflet plugin, but the <wpv-loop> shortcode breaks the plugin shortcodes.
In deed, the "map" and "marker" shortcodes must be consecutive in order to load correctly.

[wpv-layout-start]
    [wpv-items-found]
		[leaflet-map fitbounds]
<!-- wpv-loop-start -->
    <wpv-loop>
      [leaflet-marker address="[types field='coordonnees' separator=', '][/types]"]<strong>[types field="localisation"][/types]</strong> ([wpv-post-taxonomy type="ville" format="name"], [wpv-post-taxonomy type="province" format="name"], [wpv-post-taxonomy type="region" format="name"])[/leaflet-marker]
    </wpv-loop>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]Aucun incident pour cette requête.[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]
#1194087

Hello,

In the codes you mentioned above, there is a custom shortcode [leaflet-marker].

If it is created by other plugin (leaflet plugin), please check these:
Go to Toolset->Settings and click on the Front-end Content tab, in section "Third-party shortcode arguments": add the shortcode name: leaflet-marker, and test again.

See our document:
Third-party shortcode arguments
https://toolset.com/documentation/user-guides/shortcodes-within-shortcodes/#third-party-shortcode-arguments

#1194161

Hello and thank you,
I have just done that with no result.
Thank you.

#1194175

I assume we are talking about the plugin download from:
https://wordpress.org/plugins/leaflet-map/

I have tested it in my localhost, it seems that this plugin does not support shortcode in shortcode feature:
Using other shortcode as the attribute "address' value.

I don't think we can fix the problem of other plugins, it is out the range of Toolset support.

I suggest you try with Toolset Map plugin to setup the Google map, which is full compatible with other Toolset plugins.

Here is the document about "Displaying a Map with a List of Markers, Coming From a View":
https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/#displaying-a-map-with-a-list-of-markers-coming-from-a-view

For your reference.

#1194179

Thank you,
In deed the plugin's shortcodes seem to be broken by the separation of the map and the markers shortcode, which is caused by the toolset loop.
The toolset maps plugin is great but lacks a lot of functionalities (as heatmap, or shapes for instance). That is why I was looking around for another solution.
Thank you.

#1194182

I assume we are talking about these:

Heatmap Layer
hidden link

Shapes
hidden link

If it is, you are right, there aren't such kinds of feature within Toolset Maps plugin, I suggest you add a feature request for them:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

Our developers will evaluate it.

#1227845

My issue is resolved now. Thank you!