Skip Navigation

[Resolved] map template not loading in layout view.

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

Problem:
The content template created for map or not loading for layout view.

Solution:
I managed to solve it by creating a new Content Template >> then added the above map marker shortcodes into that >> and then added that newly created Content Template into the Layout.

This support ticket is created 7 years, 1 month 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
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

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

This topic contains 10 replies, has 2 voices.

Last updated by Akhil 7 years, 1 month ago.

Assisted by: Noman.

Author
Posts
#580800

Hi Noman,

i find it strange that the content tempalte created for map os not loading for layout view.

related page : hidden link click any listings to view.
Layout : hidden link

[wpv-map-marker map_id="map-1" marker_id="marker-[wpv-post-id]" marker_field="wpcf-property-address"]
[wpv-post-body view_template="gmap-marker-landed"]
[/wpv-map-marker]

I wonder why this same code cant be use for both layout and archieve page .

Thanks in advance.

#581065

Noman
Supporter

Languages: English (English )

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

Hi,

I have analyzed this issue and what I see is that in a Layout >> when we add a Map marker >> then insert a Content Template in the Popup content field >> it does not output the content (as it does on the archive page).

Please see attached screenshot -- is this what you are trying to show and is not working, please confirm?

I am also testing a few things in Layout in this regard. Thank you

#581069

Hi Noman,

Basically i'm looking for same map ct as the archive view in layout. thanks.

#581076

i notice the ct codes is outputing as a normal HTML with some style [ text-transform:capitalize] that could be the issue ?

#581088

Noman
Supporter

Languages: English (English )

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

That is generated by layout so we can't change that. That's may be the cause but I am not sure yet. I am trying to reproduce the issue at my end and will update you accordingly.

Thank you for waiting on this.

#581097

Hi Noman, i manage to somehow got it to work.
It seems to me we cannot use same ct for archieve and layout pages

i've created new template clone and its working, pls check and confirm if this is how it suppose to be ?

thanks.

#581135

Noman
Supporter

Languages: English (English )

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

I managed to solve it by creating a new Content Template >> then added the above map marker shortcodes into that >> and then added that newly created Content Template into the Layout.

Which makes it execute properly and its working now, please check the page.

Thank you

#581139

Noman
Supporter

Languages: English (English )

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

Yes right, I tried the same thing 🙂 That's also safe way to do this. So I guess we are all set here.

Thank you

#581141

Thanks Noman, but could you help to confirm that ct cant be used more than once ?
and if its a confirmed bug pls raise to the developer.

#581240

Noman
Supporter

Languages: English (English )

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

CT can be used with multiple Post types or archives. I would call it more like a limitation or parsing / execution limitation or an edge case instead of a bug at this point. Where things get too complex I have seen in another site before where a native shortcode for parent post title also didn't executed properly in a Layout.

So in such cases we use this alternate approach that is by executing the content in a CT and then re-add that into the Layout template that makes it work fine. I have found this method to be very handy.

But yeah I will keep an eye on similar case and as I found more reports on this I will pass it accordingly. Thank you

#581245

Ok. thanks for all your help. job well done.