Skip Navigation

[Resolved] Check post view template inside views loop

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 1 reply, has 1 voice.

Last updated by Mr. DJ 5 years, 10 months ago.

Author
Posts
#915896

Tell us what you are trying to do?
I am trying to check inside a view loop which '_views_template' the current loop item is using.

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
		<wpv-loop>
			[wpv-conditional if="( '_views_template' eq '1748' )"]
				Content Template: 1748
			[/wpv-conditional]
        </wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No results.[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

Is this possible? If so how can i achieve this? Thanks!

Is there any documentation that you are following?
/

Is there a similar example that we can see?
/

What is the link to your site?
hidden link

#915898

I already found a solution see below.

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
		<wpv-loop>
			[wpv-conditional if="( $(_views_template) eq '1748' )"]
				Content Template: 1748
			[/wpv-conditional]
        </wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No results.[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.