#138 Posted in ‘Econa’

Latest post by Lefteris Kavadas on Tuesday, 08 May 2018 15:19 EEST

Vincent Mross
First of all, am I the only who finds the documentation lacking? A step by step tutorial with screen shots showing how to configure the plugins and custom fields would be a huge time saver.

That said, I finally figured out through trial and error how to get the plugins working by utilizing custom fields, which means I now must train other publishers on the site about this new workflow.

Our previous workflow for most articles used the standard Joomla image handling under the "Images and Links" tab, with an Intro image and Full Article Image. I was under the impression that I could configure the plugins to automatically resize these images, which would require no change to our workflow.

QUESTION #1: is there a way to do this? I have the option for "Resize article images" set to "Yes" in the "Content - Econa" plugin.

QUESTION #2: If the answer to #1 is no, is there a way to modify the output of the "Before Display" option so that the image is placed at the same location as the standard Joomla "Full Article Image"? See these two links below, the first one is using the standard Joomla display, and the second one the Econa plugin. With the Econa plugin, the article image renders before he social media sharing buttons:

https://feminapt.com/blog/you-are-invited-to-becoming-unwound-a-conversation-about-female-sexual-health-and-pelvic-pain
https://feminapt.com/blog/chronic-constipation-the-basics

Note that the second set of buttons (round ones) use a custom module position named 'socialshare' that we have added to the content area of our template using this override:

<?php echo JHtml::_('content.prepare', '{loadposition socialshare}'); ?>
	<div itemprop="articleBody">


Looking forward to some answers to these questions!

Lefteris Kavadas
Hi,

The documentation is missing indeed a step by step setup for custom fields. However, this is a standard process for any Joomla custom field. The setup of custom fields is part of the Joomla documentation, not the extension. In case you still need help with the setup you can watch our video at https://www.youtube.com/watch?v=-h4VwoiaLL0 .

Regarding your questions:

1. Yes, that's what that option does. It will resize automatically the article images when you save the article. Note, that currently you can only resize those images, not edit. We are currently working on an update which will also bring the image editor into article images. However, the article images are restrictive because Joomla does not provide control over their output in front-end. This means that you cannot have all the nice features of the extension there (responsive images, retina images, modal etc.).

2. The custom fields is the recommended way of using Econa. There is an option in the custom field named "Automatic Display". You can find it under the "Options" tab in the custom field edit form. You can try all the available positions to see if any of them covers your needs. If not, just edit the override you are using and move the code that prints the "Before Display" plugins where you want. The code that does that is the following:
<?php echo $this->item->event->beforeDisplayContent; ?>


Please let me know if you need more help with this.

Regards

Vincent Mross
Lefteris,

Thanks for the speedy reply.

So what do we do if #1 doesn't work? I saw another post about disabling the option to clear the tmp directory in Cache Cleaner Pro (which we use), but doing this didn't help. Do you have any other solutions? This is our preferred method.

Re #2, I have tried the various options under Automatic Display, and none of them do what we want. Neither did moving the suggested code around in the template override. I believe the 'beforeDisplayContent' code handles other content besides the custom field, so this would require more granular handling of the content ordering, yes?

Another issue with that is that if we find an override solution that works with the plugin, it will likely affect all of the existing articles that are using the standard Joomla image handling, meaning we would have to go back and re-edit those articles to work with this new override.

More issues with Custom Fields:

  • If I choose "Do Not Automatically Display" under Options, it still displays as if I had chosen "Before Display".

  • If I choose "Show Label > Yes" and "Show On > Administrator", it still shows on the front end.



Looking forward to your reply.

Vince

Lefteris Kavadas
Hi,

Both options should work. Since the article images resizing does not work for you, please create a new private ticket and provide administrator access to your site so I can have a look.

If you change your mind and want to use the custom field, you have also the option to render the field manually in your override:

<?php if (isset($this->item->jcfields[1])): ?>
<?php echo FieldsHelper::render('com_content.article', 'field.render', array('field'=> $this->item->jcfields[1])); ?>
<?php endif; ?>


Note that you need to replace the number 1 with the ID of the field you want to render. You can find this at the administration in the fields manager. Using the above code and setting "Automatic Display" to "Do not automatically display" you can render the custom field in the exact place you want.

Regards

Vincent Mross
Thanks, that code worked and I didn't even have to change the ID as the article image was already #1. I did have to add this our CSS to make it match the other images:

.pull-left, .econaImage {
margin:12px 24px 12px 0;
float:left;
}


I will create a private ticket for the Article Image function. I did try reordering the plugin to last but with no effect.

Lefteris Kavadas
So, it looks that all this was just a misunderstanding. You just have to save the article to get the images resized.

I am closing this ticket now, since everything works as expected. Feel free to create a new ticket if you face any issues or need help.

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