How to add custom HTML element to code.php
Hi Admin,
I creates custom css for code.php in 6.0.12 version
I added '<div class="outer"><div class="code">
' element.
code.php
<?php echo '<ignore><!--notypo-->' . '<div class="outer"><div class="code">' . Ut::html($text) . '</div></div>' . '<!--/notypo--></ignore>';
After upgrade to 6.0.37 it's not work because the code has changed.
<?php $tpl->text = Ut::html($text);
How to add '<div class="outer"><div class="code">
' element to code.php in 6.0.37 version?
Thank you.
Comments
Log in or create an account to post a comment.
Re: How to add custom HTML element to code.php
$tpl->
, it uses a template, just look out for the subfolder namedtemplate/
and the corresponding.tpl
template file. Change the HTML code there.Or copy and rename both files and create a custom formatter which gets not overwritten with the next update, kinda
%%(my_code) ... %%
using the name of the file.How templates work you'll find in the template guide.
Re: How to add custom HTML element to code.php
I tried to change
to
but still not working
Re: How to add custom HTML element to code.php
Not working in what way?
Not working at all or still uses the previous syntax?
You have to reparse the page, e.g. edit it again or empty
body_r
, a formatter is not dynamic like an action.Once it is parsed the result is stored in the
body_r
field in the page table.Did you tried to do a small change and save it again.
And purged the old cache on the server as well the browser.
When it still uses the previous version maybe you edited the wrong file (in the wrong instance) or updated the wrong file on the server. The template is the only source for the formatter.
Re: How to add custom HTML element to code.php
Thank you Admin