Create a banner using "custom" as the type.
The put in the custom image code in the "custom code" field
and the click url in the "click url field"
banner created with image linked.
image but no link.
systeminfo-2018-02-07T07_56_11+00_00.txt
As you can see the information is ambiguous at best.
IF in fact custom code should have the full html ( which seems silly since we have an editor ) then what purpose is the click url serving?
IF the click URL is proper, then why is it not functioning?
I looked around and could find no documentation that seemed to indicate what was what.
The help page doesn't contain any information about the custom form at all.
Might actually make more sense if the custom form was just the editor.
Labels |
Added:
?
|
Category | ⇒ | com_banners |
$item-custombannercode
is the HTML code. If your HTML code has placeholders, then they will be replaced with Name
and Click URL
values accordingly. The Custom Code
tooltip could be improved to include the placeholders info.
Can someone set Label "Needs Documentation"?
Labels |
Added:
?
|
Status | New | ⇒ | Discussion |
Better yet can one of you write the documentation and them this can be closed
@brianteeman I had already planned on adding this to my J! video set but w/o clear understanding i clearly can't do so.
@Quy have you actually tried it? Cause thats not how it actually behaves. If you don't include the <a href in the "customcode" section, you get only the image.
here's a real example..
Putting in image in the editor are does nothing!
So, as you can see, its not working anywhere near the way any of us expect
@brianteeman how logical is it to you that clickurl remain but everything else pulls from the editor?
OR , leave JUST the editor?
Yes. You have to build the entire HTML markup as follows:
<a href="{CLICKURL}"><img src="enter url to image" alt="{NAME}" title="{NAME}"></a>
You don't have to use the placeholders and use your own tracking code outside of Joomla.
I assume with custom code that you have more control over its markup.
@Quy that is TOTALLY counter inuitive
This is making no sense why its designed this way. imo the following changes need to be done..
change Custom Code field type to editor
Can't do. This is intended to be an HTML input, not a WYSIWYG editor, and honestly even loading CodeMirror here is overkill (not to mention with our WYSIWYG configs you end up going through extra filtering, you're going to get the intended markup stripped out most likely in that case).
remove "description" editor
Propose for 4.0. Any field that exists now in the data schema can't be removed for B/C reasons (though unused in core it is entirely possible for someone with a layout override or custom integration to use it).
Please calm down. I am not saying anything is perfect but its been this way for X years, you just noticed it so please stop with the demanding things
@brianteeman who's demanding? idk what your issue is with me but your often pretentious towards my posts. I made a statement about a rarely used feature of banners, that has ZERO documentation, noticing their bugs and recommended fix.
Labels |
Added:
J3 Issue
|
Has the documentation been updated? This isnt a code issue but a documentation issue.
Would this be enough for the tooltip?
Before:
Select Custom to enter your custom code.
After:
Select Custom to enter your custom code. Use {CLICKURL} and {NAME} to merge 'Click URL' and 'Name' values respectively into your custom code.
my 2c is that this belongs in the documentation wiki - not the tooltip
I assume it is this page: https://docs.joomla.org/Help38:Components_Banners_Banners_Edit
However, it is not obvious how to submit changes.
there is a help menu in the blue bar
@infograf768 Do you know where else to update the doc? The above link has placeholders and not the actual text. Thanks.
@Quy
That one is a bit more complex than just editing the help screen.
As you can see, there is a only one screenshot for the banner type Image
, which means a new screenshot should be added when using custom
and a new Details added.
plus indeed the fact that has to be edited the placeholder stuff.
Let me contact who is in charge of this and ask her to help you here.
@Quy
Sandra added some stuff to that help screen.
You can modify (add other possible code) on this page
https://docs.joomla.org/Chunk30:Help_screen_column_header_Detail_Tab_Banner_Edit
After some tests, any HTML code works fine.
I tried with <div class="center"><a href="https://shop.joomla.org"><img src="images/banners/shop-ad.jpg"><br />Buy your Joomla swag now!</a></div>
All is displayed as expected. The link works fine, text and image are displayed.
Status | Discussion | ⇒ | Information Required |
Closed_Date | 2018-05-13 14:31:44 | ⇒ | 2018-05-13 14:31:45 |
Closed_By | Quy | ⇒ | joomla-cms-bot |
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-13 14:31:44 |
Closed_By | ⇒ | Quy |
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/19596
Documentation updated.
I had to look in the code.
<?php echo str_replace(array('{CLICKURL}', '{NAME}'), array($link, $item->name), $item->custombannercode); ?>
Yes enter full html with 2 available placeholders
{CLICKURL}
and{NAME}
.For example:
<a href="{CLICKURL}"><img src="enter url to image" alt="{NAME}" title="{NAME}"></a>