By wilco1219 on Sunday, 12 December 2021
Replies 3
Likes 0
Views 813
Votes 0
I'm having some dificulties recently with a template override I have created. I have made an override in the flat-template of the file month/tmpl/calendar_body.php In this override I added an extra button on the right side of "Next month". The name of this button is formatted as language override, which is available in the Joomla-template I'm using. The error suggest that this language override, named TPL_PLONS_AGENDA_LIJSTTEXT, can't be found.

This is the URL where the error message is displayed: https://www.plons.nu/agenda/maandkalender/2021/12?catids=
Attached is the file with the override of the flat template
I'm using Joomla

This is the php code in beginning of calendar_body.php

$app = JFactory::getApplication();
$thismenu = $app->getMenu()->getActive()->link;

use Joomla\String\StringHelper;

$cfg = JEVConfig::getInstance();

if ($cfg->get("tooltiptype",'joomla')=='overlib'){
JEVHelper::loadOverlib();
}

$view = $this->getViewName();
echo $this->loadTemplate('cell' );
$eventCellClass = "EventCalendarCell_".$view;

// previous and following month names and links
$followingMonth = $this->datamodel->getFollowingMonth($this->data);
$precedingMonth = $this->datamodel->getPrecedingMonth($this->data);


This is the code that was added after the Next month button:

<div class="lijstweergave">
<?php echo "<a href='".JRoute::_($thismenu)."' title='".JText::_(TPL_PLONS_AGENDA_LIJSTTEXT)."' style='text-decoration:none;'>".JText::_(TPL_PLONS_AGENDA_LIJST)."</a>";?>
</div>


Can somebody help me get my override back working again?
Hello,

IT is correct because the coding is incorrect it should be:


<div class="lijstweergave">
<?php echo "<a href='".JRoute::_($thismenu)."' title='" . JText::_('TPL_PLONS_AGENDA_LIJSTTEXT') . "' style='text-decoration:none;'>".JText::_(TPL_PLONS_AGENDA_LIJST)."</a>";?>
</div>


Many thanks
Tony
·
2 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you! This solved my problem
·
2 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Awesome!
·
2 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post