- Posts: 29
- Thank you received: 2
Can I use a Joomla plugin in a template override?
15 years 2 months ago - 15 years 2 months ago #22460
by BRupholdt
Can I use a Joomla plugin in a template override? was created by BRupholdt
I've made a custom field to hold a video url for my products. I'd like to add simple line like
into the product show file but Joomla doesn't parse the plugin code since it's not in the content area.
Is there a way to do this?
Code:
{youtube}< ? php echo $this->element->video_url; ? >{/youtube}
into the product show file but Joomla doesn't parse the plugin code since it's not in the content area.
Is there a way to do this?
Last edit: 15 years 2 months ago by BRupholdt.
Please Log in or Create an account to join the conversation.
15 years 2 months ago #22475
by nicolas
Replied by nicolas on topic Re: Can I use a Joomla plugin in a template override?
Hi,
You should try like that:
<?php echo JHTML::_('content.prepare','{youtube}'.$this->element->video_url.'{/youtube}'); ?>
You should try like that:
<?php echo JHTML::_('content.prepare','{youtube}'.$this->element->video_url.'{/youtube}'); ?>
Please Log in or Create an account to join the conversation.
15 years 2 months ago - 15 years 2 months ago #22518
by BRupholdt
Replied by BRupholdt on topic Re: Can I use a Joomla plugin in a template override?
Tried that but it just output the tag. Here's my actual code
and here's the ouput
It's building the tag perfectly but not parsing it.
(Spaces added to the php tags so it will show in the forum)
Code:
< ? php echo JHTML::_('content.prepare','{mbox:http://youtu.be/'.$v.'|640|380|title='.$this->element->product_id.'|vthumb=http://img.youtube.com/vi/'.$v.'/1.jpg}'); ? >
and here's the ouput
Code:
{mbox:http://youtu.be/--k0WsFGom0|640|380|title=115|vthumb=http://img.youtube.com/vi/--k0WsFGom0/1.jpg}
It's building the tag perfectly but not parsing it.
(Spaces added to the php tags so it will show in the forum)
Last edit: 15 years 2 months ago by BRupholdt.
Please Log in or Create an account to join the conversation.
15 years 2 months ago #22523
by nicolas
Replied by nicolas on topic Re: Can I use a Joomla plugin in a template override?
And did you publish the multimedia box plugin ? Looking at the code of the plugin I don't see why that wouldn't work.
Are you able to display it with the same tag code in a joomla article ?
Are you able to display it with the same tag code in a joomla article ?
Please Log in or Create an account to join the conversation.
15 years 2 months ago #22554
by BRupholdt
Replied by BRupholdt on topic Re: Can I use a Joomla plugin in a template override?
Yes. I use the mbox plugin on another page in the site. I build the tag dynamically there as well. I used that pages output to make sure I had the tag right on this one.
Please Log in or Create an account to join the conversation.
15 years 2 months ago #22556
by BRupholdt
Replied by BRupholdt on topic Re: Can I use a Joomla plugin in a template override?
I tried using rokbox instead of mbox and it works. Not sure why mbox won't parse that way but it has to be something with their plugin. I'll see if I can get a response from yoojoomla on it. Thank you for your help.
Please Log in or Create an account to join the conversation.
Time to create page: 0.198 seconds