Search
Other Articles Anywhere questions
Forum

using custom fields inside of HTML 5 video element not parsing

Seppi's Avatar Seppi
Hi, I need to access values from (custom) fields [image-intro] of the current article from a html 5 video player. Unfortunately the article anywhere tags seem not to work (and I was quite sure, I already did something similar, but I can't find it anymore):
{article}<video id="TopVideo" src="[b][video-link][/b]" controls="" playsinline="" preload="none" uk-video="inview"  poster="[b][image-intro][/b]" width="2140"></video>{/article}

I also tried
<video id="TopVideo" src="[b]{article}[video-link]{/article}[/b]" controls="" playsinline="" preload="none" uk-video="inview"  poster="[b]{article}[image-intro]{/article}[/b]" width="2140"></video>

instead, same problem: The article anywhere shortcode is not parsed, in the console I see the result as follows:
<video id="TopVideo" src="/%5Bvideo-link%5D" controls="" playsinline="" preload="none" uk-video="inview" poster="/%5Bimage-intro%5D" width="2140"></video>

When I try to access the fields outside of the <video> object, the values are parsed, so article anywhere works and the field names are correct.

any idea what I'm missing / where my mistake could be?

thanks a lot.

S.
Peter van Westen's Avatar Peter van Westen ADMIN
[image-intro] is reserved for outputting the core intro image of the article:
docs4.regularlabs.com/articlesanywhere/data-tags/images

You would have to use a different name for your field, or use:
[field:image-intro]
Please post a rating at the Joomla! Extensions Directory
Seppi's Avatar Seppi
thanks, Peter.

In fact, for one source I want to show the image-intro of the core article. So I tried with the suffix «field:» (didn't know this one) but it still doesn't work.
{article}<video id="TopVideo" src="/%5Bfield:video-link%5D" controls="" playsinline="" preload="none" uk-video="inview" poster="/%5Bfield:image-intro%5D" width="2140"></video>{/article}

It seems more, like the field is not «transformed» into a value in the first place.

I even tried with entering %5B and %5D instead of [ and ], but this doesn't change anything neither.

Any other approach?

thank you

S.
Peter van Westen's Avatar Peter van Westen ADMIN
Why use:
/%5Bfield:video-link%5D
Just use:
[video-link]
Please post a rating at the Joomla! Extensions Directory
Seppi's Avatar Seppi
... this is exactly my problem. It's happening, when it's parsed. I don't use this (I only tried to track it down).

What I actually used:
{article}<video id="TopVideo" src="[video-link]" controls="" playsinline="" preload="none" uk-video="inview"  poster="[image-intro]" width="2140"></video>{/article}

it seems like the video element destroys it. Because when I copy the field names to a position before <video> oder </video>, the field is rendered.
{article}[video-link]<video id="TopVideo" src="[video-link]" controls="" playsinline="" preload="none" uk-video="inview"  poster="[image-intro]" width="2140"></video>[image-intro]{/article}

But I can't work with this, of course. I need the field values in the right place inside the video-tag.

thanks.
Peter van Westen's Avatar Peter van Westen ADMIN
If you just want the value, use:
[video-link:text]
Or:
[video-link:value]
As described here:
docs4.regularlabs.com/articlesanywhere/d...lain-text-raw-values
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription