Note that there are some explanatory texts on larger screens.

plurals
  1. POTooltips in Joomla containing HTML
    primarykey
    data
    text
    <p>I created a component using <a href="http://www.component-creator.com/" rel="nofollow">Component Creator</a> for Joomla 3.X</p> <p>The problem is that on the site the tooltips show html code. For example:</p> <pre><code>&lt;strong&gt;Title&lt;/strong&gt;&lt;br/&gt;Description </code></pre> <p>Instead, on the administrator they are displayed properly:</p> <blockquote> <p><strong>Title</strong></p> <p>Description</p> </blockquote> <p>I was reviewing the documentation <a href="http://docs.joomla.org/How_to_add_tooltips_to_your_Joomla!_website" rel="nofollow">here</a> and <a href="http://getbootstrap.com/javascript/#tooltips-usage" rel="nofollow">here</a>, and it seems that it is possible to define the output format when calling the tooltip function but there are no calls inside the component to that function. The only call I see is <code>JHtml::_('behavior.tooltip');</code> at the begining of the view file and don't know how to specify the output format.</p> <p>The site is in this URL:</p> <pre><code>http://50.87.185.99/colombianadederecho_blank/index.php/administradores-ph/registrarse </code></pre> <p><strong>Added:</strong></p> <p>It seems like the code is called when building the label for each field:</p> <pre><code>&lt;div class="control-group"&gt; &lt;div class="control-label"&gt;&lt;?php echo $this-&gt;form-&gt;getLabel('document'); ?&gt;&lt;/div&gt; &lt;div class="controls"&gt;&lt;?php echo $this-&gt;form-&gt;getInput('document'); ?&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>And it is stored in the title attribute:</p> <pre><code>title="&amp;lt;strong&amp;gt;Title&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;Description" </code></pre> <p>So, I think the problem is in the Javascript function, maybe using a .text() jQuery function instead of a .html(). </p> <p>Inspecting the source code I found this, but don't understand why it is not working properly:</p> <pre><code>window.addEvent('domready', function() { $$('.hasTip').each(function(el) { var title = el.get('title'); if (title) { var parts = title.split('::', 2); el.store('tip:title', parts[0]); el.store('tip:text', parts[1]); } }); var JTooltips = new Tips($$('.hasTip'), {"maxTitleChars": 50,"fixed": false}); }); jQuery(document).ready(function() { jQuery('.hasTooltip').tooltip({"html": true,"container": "body"}); }); </code></pre> <p><strong>Solution:</strong> As @ilias found it was a problem between libraries. I had to disable the bootstrap call in the header using this <a href="http://digitaldisseny.com/en/joomla-extensions/disable-mootools-joomla-per-itemid-solve-jquery-conflicts" rel="nofollow">plugin</a> and call it from the end of the body:</p> <pre><code>&lt;script src="/site/media/jui/js/bootstrap.min.js" type="text/javascript"&gt;&lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload