Skip Navigation

[Resolved] Use nested views to create html (link) element.

This support ticket is created 5 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by barbaraK 5 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#1357733

I try to make a custom link using nested views.
Both views are taxonomy views and every shortcodes separate give a correct results.
But if I use nested shortcode of another view in link code, it doesent work becouse of double/single quotes.

I need something like this:

hidden link name="city-slug"]/" alt="[wpv-taxonomy-title] service in [wpv-view name="city-name"] ">[wpv-taxonomy-title]

How to make it work?

#1357913

Nigel
Supporter

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

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

You can fix the double quotes problem like so:

<a href="<em><u>hidden link</u></em> name='city-slug']/" alt="[wpv-taxonomy-title] service in [wpv-view name='city-name'] ">[wpv-taxonomy-title]</a>

i.e. just by changing the attributes of the wpv-view shortcodes to use single quotes so that they don't prematurely close the surrounding double-quotes.

#1357953

It doesn't work at all.
Your code looks weird href inside href and square bracket. closed at unexpected place.

But according what you wrote.
Even after I changed double quotes to single one in toolset shortcodes, and leave double quotes for html, still doesn't work.

#1357955

Nigel
Supporter

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

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

The markup itself fixes the double-quotes problem, but then I don't know what your shortcodes are actually outputting to know what's finally printed on the page will work.

wpv-taxonomy-slug and wpv-taxonomy-title are unlikely to cause you any problems, it's likely to be the output of your View that is the problem.

What exactly does the wpv-view name='city-slug' View output?

Did you disable the wrapper div for the output of the View?

#1358029

Thank you, disabling wrapping solved the problem. I didn't notice this feature.

#1358031

My issue is resolved now. Thank you!