Search
Other Sourcerer questions
Forum

Problem formatting

Thore Olaf Kühn's Avatar Thore Olaf Kühn
Hello Peter,
after switching from Joomla 3 to 4 I have a problem with the display of the code I have set.
We have a lot of editorial content and use a marker (image file) from VG Wort.
This is what the integration via Sourcerer v9.8.0 looked like in the old system:
<dl class="fields-container">
	<dd class="field-entry vg-wort "><span class="field-value "><img src="https://vg05.met.vgwort.de/na/7fbc08eebbca46c7b08804d604293862" width="1" height="1" alt=""></span>
</dd></dl>

And like this under Sourcerer v10.1.3 [PRO]:
<ul class="fields-container">
    <li class="field-entry vg-wort "><span class="field-value "><img src="https://vg05.met.vgwort.de/na/7fbc08eebbca46c7b08804d604293862" width="1" height="1" alt=""></span>
</li></ul>

Due to the li tag, I now have a bullet point without any further text. How do I get rid of this? The problem occurs regardless of the template.

Best regards
Thore
Peter van Westen's Avatar Peter van Westen ADMIN
Seems to me this has nothing to do with Sourcerer.
Sourcerer doesn't determine what output it creates. That is determined by the code you give it.
So whatever you placed inside the {source} tags is generating the html output you see.

Also, if you don't want a bullet on your li tag, solve that via CSS.
Please post a rating at the Joomla! Extensions Directory
Thore Olaf Kühn's Avatar Thore Olaf Kühn
Thank you for the quick response.
Since it's not the plugin, I've continued my search. CSS can be done, but there should be a simpler solution.
And there is! The problem comes from: com_fields/layouts/fields/render.php
$output[] = '<li class="field-entry ' . $class . '">' . $content . '</li>';
That's where the bullets come from!
Peter van Westen's Avatar Peter van Westen ADMIN
No, to be technical: that's where the <li> comes from.
The bullets come from the templates and/or the browsers default styling for the unordered lists. You can change that via CSS.

If you override the field renderer, then you would also need to override the file that outputs the <ul> wrapper.
CSS can be done, but there should be a simpler solution
No, the simplest and best solution is to wrap your output in an element with a class, and style the list inside it how you want... via CSS.

But again: this all has nothing to do with Sourcerer.
For more help and guidance on this, I recommend you ask on the Joomla forum.
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