Skip Navigation

[Résolu] Nested Views AJAX Pagination Inner View Losing Outer View Information

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.

This topic contains 2 réponses, has 1 voix.

Last updated by davidT-8 Il y a 6 années et 7 mois.

Auteur
Publications
#308548

I have a nested view setup on a page, whereby the outerview uses a custom taxonomy (via Types) to filter the inner view, which in turn uses the shortcode provided by the outerview to display its custom post types. Pagination is on the inner view only. For the most part, this is functioning as designed. My problem is this...

The information from the outer view that is passed to the inner view is important to more than just the inner view from Views. I need to use the shortcode to pass section information to other portions of my site via a class or a datalayer variable (preferred) in inner view elements, including pagination controls. Unfortunately, upon pagination, the information from the outer layer filter, which is what the inner content is derived through, disappears. In my specific instance, content derived from [wpv-taxonomy-title] is lost upon AJAX pagination.

I'm using Types 1.6.4 and Views 1.8.1 on WordPress 4.2 on an internal development site.

#308549

Because you may ask...

Outer View displays Taxonomy, custom type, and has a Taxonomy Term Filter (One of these).

OUTER VIEW FILTER

[wpv-filter-start hide="true"]
[wpv-filter-controls]
[/wpv-filter-controls]
[wpv-filter-end]

OUTER VIEW LOOP OUTPUT

[wpv-layout-start]
	[wpv-items-found]
		<!-- wpv-loop-start -->
		<div class="classblock">
          <wpv-loop>
				<div class="class" id="[wpv-taxonomy-title]">
					<div class="classname">
						<a rel="nofollow" target="_blank" href="[wpv-taxonomy-description]">[wpv-taxonomy-title]</a>
					</div>
					[wpv-view name="VIEW" wpvfeedsource="[wpv-taxonomy-slug]"]
				</div>
			</wpv-loop>
		</div>
		<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		[wpml-string context="wpv-views"]<strong>No items found</strong>[/wpml-string]
	[/wpv-no-items-found]
[wpv-layout-end]

OUTER VIEW FILTER and LOOP OUTPUT INTEGRATION

[wpv-layout-meta-html]

Inner View displays Post Types, custom, ordering by Post date, and has a Taxonomy filter set by View shortcode, and a custom field filter limited display time to posts within past 60 days.

INNER VIEW FILTER

[wpv-filter-start hide="false"]
	<div class="feedblockpagination" data-feed="[wpv-taxonomy-title]">
		[wpv-pager-prev-page][wpml-string context="wpv-views"]Previous[/wpml-string][/wpv-pager-prev-page]
		[wpv-pager-next-page][wpml-string context="wpv-views"]Next[/wpml-string][/wpv-pager-next-page]
</div>
[wpv-filter-end]

INNER VIEW LOOP OUTPUT

[wpv-layout-start]
	[wpv-items-found]
		<ul class="classlist">	
			<wpv-loop>
				<li class="classitem">
					<div class="itemtitle">
						<a id="[wpv-post-id]" data-feed="[wpv-taxonomy-title]" rel="nofollow" target="_blank" href="[wpv-post-field name="original_source"]">[item-new-2][wpv-post-date format="U"][/item-new-2][wpv-post-title output="sanitize"]</a>
					</div>
				</li>
			</wpv-loop>
		</ul>
	[/wpv-items-found]
	[wpv-no-items-found]
[wpml-string context="wpv-views"]<div class="NoItems"><strong>No items found</strong></div>[/wpml-string]
	[/wpv-no-items-found]
[wpv-layout-end]

INNER VIEW FILTER and LOOP OUTPUT INTEGRATION

[wpv-layout-meta-html]
[wpv-filter-meta-html]
#308552

Hmmm... upon closer inspection, it may be an issue with a misunderstanding on my part on when to use [wpv-post-taxonomy] vs. [wpv-taxonomy-title]... The confusion stemmed from the success of [wpv-taxonomy-title] (and slug) on an Inner View on its initial load. Perhaps the issue, then, is that it shouldn't have worked, in the first place...