Skip Navigation

[Resolved] wpv-view-layout and js-wpv-view-layout-XXXXXX

This support ticket is created 4 years, 4 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 3 voices.

Last updated by Shane 4 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#1801345
vwp.png

I have a couple of views that i have made in Toolset blocks. Its quite hard to explain but i will try my best.

One of my views let say "Partners-view" works perfectly. I can use it in every page i like and the "js-wpv-view-layout-360000" is always the sam on every page. witch i like! Then i can add styles and so on to it and it get the same style one every page.
i use this code to add it in a page "{!{wpv-post-body view_template='project-bottom-nav-grid'}!}"

Then i made a copy (named it to "Talare") of it and editing the copy. No problem at all. works nice.
i use this to add it to pages "{!{wpv-post-body view_template='talare2020gridpage'}!}" - it works
BUT, heres the thing, all the classes becoume dynamic.. like this TCPID... " js-wpv-view-layout-360001-TCPID360588"
This dynamic TCPID is different on all pages, and i need to have this on 25pages (speakers) and this view is suposed to be on every speaker-page .
thats make its verry hard to add styles andd jquerys to the views.

Why does this view gets this dyniamic ID ? I want it like the first view, always the same "js-wpv-view-layout-XXXXXX"

#1802539

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I suggest a simple workaround of adding a custom class or id to the element you insert the View into, so that you can target it for CSS or JS that way.

I'm guessing from how you describe inserting the View (with a shortcode in the {!{ ... }!} format) that you are inserting the View using a page builder. Typically you would be doing so by adding it to a text module of the builder, so you can add a custom class or ID to the text module, which can be the same on every page and used for targeting the inner View.

#1802877

Okej, but it strage that one view do this and another do not.

#1803315

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Patrik,

Not sure why this is occurring but if this view is the only view on the page then you can also go ahead and use the js-wpv-view-layout

As what you can do is to add the custom css directly to the view itself.

Thanks,
Shane