Articles Anywhere

image intro is not displayed

1 month 2 weeks ago #90018

Anita Kooistra's Avatar Anita Kooistra

Hello,

I have two questions, who may relate to each other because it occurs in the same article, that's why I ask both of them at the same time here.

First question: In a Joomla article I have put the following code to get a list of articles in a category. One of the things I want to render is the intro image. But when there is no intro image it has to render the default image. That part works well, but I do not get to see the intro image who IS there.
I used following code:

<div class="left-imagebox-ref-ak">{if image-intro} <img class="img-overzicht-ref-ak" src="[image-intro]" alt="[title]" /> {else} <img class="img-overzicht-ref-ak" src="images/referenties/default-profiel.jpg" alt="default profilepicture" /> {/if}</div>

So on the website in the page source the code states as follows:
<div class="left-imagebox-ref-ak"> <img class="img-overzicht-ref-ak" src="/<img%20src=" images="" alt="logo Ooms bouwbedrijf" title="logo Ooms bouwbedrijf">" alt="Jeannet Kars – Ooms bouwbedrijf" /&gt; </div>

According to my information the data tag for the intro image is [image-intro] or does it change when used on a joomla website together with the templatebuilder of YOOtheme Pro?

Second question:
I've made several custom fields. When I want to add a custom field to an article which will be rendered in the same website page I do NOT see the information which contains in the several custom fields.
I used the Joomla button 'Fields' on the bottom of the editor in the article and select the particular field. In this case it states '{field 19}'. Is this not the right way to do this?

Hope to hear from you soon, because I've been looking and searching to solve this problem for several days, but cannot find the solution. Thanks in advance for your help


Confidential information:
(hidden)

1 month 2 weeks ago #90020

Andy Badwool's Avatar Andy Badwool Moderator

The first issue is simple. You're trying to input the [image-intro] tag inside an <img src="..."> tag. But the [image-intro] already generates its own <img> tag, so you don't need to add it. You can see the issue happening if you look att he source code.

So you should do this instead:

{if image-intro}[image-intro]{else}....{/if}

Or, if you want more control over your classes and the rest of the <img> tag, you can use [image-intro-url] instead, which just generates the url of the image:
{if image-intro}<img class="img-overzicht-ref-ak" src="[image-intro-url]" alt="[title]" />{else}....{/if}

Second question:
I do NOT see the information which contains in the several custom fields

What do you mean by this?

By yeah, to output custom fields of the same article you're editing, you can either use the core method like {field 19}, or use Articles Anywhere [name-of-the-field] if you're inside {article} tags.

1 month 2 weeks ago #90021

Peter van Westen's Avatar Peter van Westen Admin

Here is an overview of all the different available Data Tags:
www.regularlabs.com/extensions/articlesa...e/tutorial#data-tags

For more specific info on the different image tags and options, see:
www.regularlabs.com/extensions/articlesa...ial#data-tags-images

And her for the stuff on Custom Fields:
www.regularlabs.com/extensions/articlesa...a-tags-custom-fields

2 weeks 22 hours ago #90605

Anita Kooistra's Avatar Anita Kooistra

Andy Badwool wrote:


Second question:
I do NOT see the information which contains in the several custom fields

What do you mean by this?

By yeah, to output custom fields of the same article you're editing, you can either use the core method like {field 19}, or use Articles Anywhere [name-of-the-field] if you're inside {article} tags.

Thank you very much with your help on the first question, it works like a charm 😁.

About the second question:
{field 19} should work inside the texteditor of an article, right? It is an option to write it down or to use the button beneath the texteditor to add a custom field. Either way it generates only the text {field 19}. But it will not give the output of the field on the website. And I wonder why...
Hope you can explain that?
Thanks in advance

2 weeks 22 hours ago #90607

Andy Badwool's Avatar Andy Badwool Moderator

So you're saying that when using {field 19} it's not actually outputting the custom field on the article in the frontend?

That sounds like a Joomla issue if that's the case. Does the {field 19} actually have a value? But yeah, this has nothing to do with Articles Anywhere.

2 weeks 19 hours ago #90612

Anita Kooistra's Avatar Anita Kooistra

Andy Badwool wrote:

So you're saying that when using {field 19} it's not actually outputting the custom field on the article in the frontend?

That sounds like a Joomla issue if that's the case. Does the {field 19} actually have a value? But yeah, this has nothing to do with Articles Anywhere.

oké, so I should let Joomla know about this... I will.

And I do have one more issue with the [image-intro-url] solution as given by you. (See earlier posts in this topic.)
I've used this in an article between the {articles tag="Workshop"} {/articles} tag and there it works great. But when I use it in the same way in a module with the {articles category="Referenties"} {/articles} tag, it cannot find the image.
Do I have to change the way of writing it in a Joomla module?

Thank you for your help so far... 🙂

Getting closer to a beautiful site... and loving it 😉

2 weeks 19 hours ago #90613

Peter van Westen's Avatar Peter van Westen Admin

The [image-intro-url] should work the same where-ever you place it.
So it should give you the url of the intro image attached to the article being displayed through the {article}/{articles} tags.

Are you sure there is an intro image attached to the article(s) in question?

2 weeks 14 hours ago #90618

Anita Kooistra's Avatar Anita Kooistra

Peter van Westen wrote:

The [image-intro-url] should work the same where-ever you place it.
So it should give you the url of the intro image attached to the article being displayed through the {article}/{articles} tags.

Are you sure there is an intro image attached to the article(s) in question?
Thank you for your reaction, Peter. We double checked if the articles in question have the intro images, and they do!
Because of your answer we went back to the first reply we got from Andy on this topic:
So you should do this instead:
{if image-intro}[image-intro]{else}....{/if}

Or, if you want more control over your classes and the rest of the <img> tag, you can use [image-intro-url] instead, which just generates the url of the image:
{if image-intro}<img class="img-overzicht-ref-ak" src="[image-intro-url]" alt="[title]" />{else}....{/if}

As explained, we did Andy's second option, because we would like to control the styling with a class. In the front end we see:
<img class="img-overzicht-ref-ak" src="/%5Bimage-intro-url%5D" alt="[title]">

As stated, this way works in an article very well. There we see in the front end:
<img class="img-overzicht-ref-ak" src="/images/referenties/logo.png" alt="logo klant">

Just to rule out any possibilities we just now tried the first option given by Andy in the module:
{if image-intro}[image-intro]{else}....{/if}
And now it works!!
But why we don't understand. Maybe you understand?

For now we keep it, because the output is oké. It's no problem that the img cannot be styled with classes. If you do know the solution, we are always interested 😁 .

Thanks again and greetings,

Anita

2 weeks 14 hours ago #90620

Peter van Westen's Avatar Peter van Westen Admin

So if I understand correctly, the [image-intro] works, but the [image-intro-url] doesn't.

Can you do this to see what that tag actually outputs?

{if image-intro}Testing Intro Image URL: [image-intro-url]{else}....{/if}

1 week 6 days ago #90635

Anita Kooistra's Avatar Anita Kooistra

Peter van Westen wrote:

So if I understand correctly, the [image-intro] works, but the [image-intro-url] doesn't.

Can you do this to see what that tag actually outputs?
{if image-intro}Testing Intro Image URL: [image-intro-url]{else}....{/if}

I pasted your code as requested and the output is:

Testing Intro Image URL: images/referenties/leekerweidegroep.png

so just plain text, the url is no link.
Hope to have informed you enough, otherwise please let me know. It is nice to help you find, what may be a bug?

1 week 6 days ago #90636

Peter van Westen's Avatar Peter van Westen Admin

Going by that, the code should work.

{if image-intro}<img class="img-overzicht-ref-ak" src="[image-intro-url]" alt="[title]" />{else}....{/if}
should output html like this:
<img class="img-overzicht-ref-ak" src="images/referenties/logo.png" alt="logo klant">
The slash at the beginning of the image url should get added by Joomla in the final rendering process, which would result in:
<img class="img-overzicht-ref-ak" src="/images/referenties/logo.png" alt="logo klant">

Do you have this online so I can take a look?

1 week 6 days ago #90637

Anita Kooistra's Avatar Anita Kooistra

Peter van Westen wrote:

Going by that, the code should work.
{if image-intro}<img class="img-overzicht-ref-ak" src="[image-intro-url]" alt="[title]" />{else}....{/if}
should output html like this:
<img class="img-overzicht-ref-ak" src="images/referenties/logo.png" alt="logo klant">
The slash at the beginning of the image url should get added by Joomla in the final rendering process, which would result in:
<img class="img-overzicht-ref-ak" src="/images/referenties/logo.png" alt="logo klant">

Do you have this online so I can take a look?

In order to show you I adjusted the code as follows:
<h3><span style="color: #ff6600;">Referenties:</span></h3>
<p>{articles category="Referenties" referentie-van-uitje="this:id" empty="Voor dit uitje hebben we nog geen referentie ontvangen. Neem <a href="index.php?option=com_content&amp;view=article&amp;id=19&amp;Itemid=124" target="_blank">contact</a> met ons op en wees de eerste voor dit uitje."} [link][title][/link]</p>
<p>{if image-intro} <img class="img-overzicht-ref-ak" src="[image-intro-url]" alt="logo [title]" /> {else} <img class="img-overz-refprofiel-ak" src="images/referenties/default-profiel.jpg" alt="default profile picture" width="100" height="100" /> {/if} <br /> [volledig-artikel]</p>
<p><b>testing:<br /> 1st option : image-intro-url</b></p>
{if image-intro} <img class="img-overzicht-ref-ak" src="[image-intro-url]" alt="logo [title]" /> {else} <img class="img-overz-refprofiel-ak" src="images/referenties/default-profiel.jpg" alt="default profile picture" width="100" height="100" /> {/if}
<p><b>2nd option : image-intro</b></p>
<p>{if image-intro} [image-intro] {else} <img class="img-overz-refprofiel-ak" src="images/referenties/default-profiel.jpg" alt="default profile picture" width="100" height="100" /> {/if}</p>
<p>{/articles}</p>

You can see it in the blue right column on this page: demo7.birdcageonline.nl/nl/uitjes/stadss...gps-spel-culinair-co
Do you need admin access?

1 week 6 days ago #90641

Peter van Westen's Avatar Peter van Westen Admin

In the html Articles Anywhere gets to see, it contains:

src="/%5Bimage-intro-url%5D"
instead of:
src="[image-intro-url]"
So something (probably a system plugin) seems to be messing with the syntax inside the src attribute.

It is probably due to the system plugin ordering. Try changing the ordering of the plugins in question.
See: www.regularlabs.com/guides/242-plugin-order-is-important

1 day 22 hours ago #90828

Anita Kooistra's Avatar Anita Kooistra

Peter van Westen wrote:

In the html Articles Anywhere gets to see, it contains:
So something (probably a system plugin) seems to be messing with the syntax inside the src attribute.

It is probably due to the system plugin ordering. Try changing the ordering of the plugins in question.
See: www.regularlabs.com/guides/242-plugin-order-is-important

Hai Peter,
I looked at your video about the plugin-order and changed some accordingly... for as far as possible, because the plugins you have in your example are not the ones I have.
So here I send you a picture of my system plugins, because the image-intro is still not visible.
Confidential information:
(hidden)


I also wanted to show the image-intro in the full article layout because the logo's are too small to use it as full article image (which has 830px width), but it will not show in any way. I tried it in all the following ways: {image-intro} {image-intro-url} [image-intro] [image-intro-url].
I'm getting kinda desparate here 🙁 . Hope you can help me with this.
Thanks in advance 🙂

1 day 18 hours ago #90831

Peter van Westen's Avatar Peter van Westen Admin

Your plugin screenshot doesn't show the plugins in order. You need to order the results by the ordering (click on first column header, as explained in the video). Only then can you reorder plugins.