Operating System & Version
CentOS 7.9
cPanel & WHM Version
104.0.7

ankeshanand

Well-Known Member
Mar 29, 2021
209
64
103
India
cPanel Access Level
Root Administrator
Twitter
I am editing /usr/local/cpanel/base/frontend/jupiter/tools/index.tt . Here is the code I've edited:


<tr>
<td colspan="2">
<label id="lblLastLogin" class="general-info-label">[% locale.maketext("SPF and DKIM Records") %]</label>
<a href="[% CPANEL.CPVAR.dprefix _ '/email_deliverability' %]/#/manage?domain=[% domain %]" class="general-info-value">
[% locale.maketext("Click Here") %]
</a>
</td>
</tr>

This code is for adding an option in the sidebar. It was supposed to do this in cPanel Frontend UI:

<tr>
<td colspan="2">
<label id="lblLastLogin" class="general-info-label">SPF and DKIM Records</label>
<a href="https://HOSTNAME:2083/SESSION/frontend/THEME/email_deliverability/#/manage?domain=DOMAIN" class="general-info-value">
Click Here
</a>
</td>
</tr>

but what it's doing is this:

<tr>
<td colspan="2">
<label id="lblLastLogin" class="general-info-label">SPF and DKIM Records</label>
<a href="/email_deliverability/#/manage?domain=DOMAIN" class="general-info-value">
Click Here
</a>
</td>
</tr>


i.e CPANEL.CPVAR.dprefix is not working. It's working correctly in the whole page but while applying this custom element, it does not work. Anything I am missing from my side?

Also, I am sorry for pasting code like this but whenever I use Code option in Editor, it does this instead of opening the code editor. Please fix it as well or let me know if it's a problem from my side!
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
I did hear back from the User Interface team and they let me know that editing any of the .tt files is not supported. You're welcome to try as part of your testing, but it may have unpredictable results.

The best way to handle interface customizations is through the content includes tool here: Guide to cPanel Interface Customization - Content Includes