#102 Posted in ‘Econa’

Latest post by Lefteris Kavadas on Wednesday, 31 January 2018 22:49 EET

Ian Wyllie
 Hi
Lovely software :-)
I've got a small problem. Having replaced my article intro images with specific fielded images from the econa tab system I need these to be linkable to the $fulltext.

Context

I'm using the Econa image tab system to give me srcset handling of images in blog and category blog view. that is to say I am not using article images.

Field display is set to be "before display" becuase otherwise the plugin doesnt get called.

Clearly an essential move is to override econa.php as you describe and I have that override here:
../Sites/helix/templates/my_favourite_template/html/plg_fields_econa/econa.php
I have demonstrated that this overidede is active

Now from the plugin's scope how do I get the $id of the article such that I can use ContentHelperRoute::getArticleRoute or whatever method to make an <a href for that fielded image?

Lefteris Kavadas
Hi,
The article data is available in the variable $item inside the layout. All you need to to is use the correct variable:
<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)); ?>

In the article view the link is already generated:
<?php echo $item-> readmore_link; ?>

If you like Econa for Joomla please post a review at the Joomla extensions directory.
Let me know if you need more help.

Regards

Ian Wyllie
Dear Lefteris

Awesome. Sorry for the stupid on my part... Thanks for your courtesy in putting me on the right road.

Ian W.

Lefteris Kavadas
No worries, there was nothing stupid in your request!
Please let me know if you need anything else.

Regards

Lefteris Kavadas
Just to let you know, we added an option for that for the next update so you do not have to create layout overrides.

Regards

Note: An active subscription is required in order to get support for our paid extensions. For our free extensions, if you don't have an account, register and then submit your support request.  In case you just want to ask a question, you can also use the contact form .

Firecoders
Are you using our extensions? Please post a review at the Joomla extensions directory!
Post a review