Template override not working

News Show Pro GK5 - flexible, responsive and easily extendable free Joomla module support forum.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Wed Nov 11, 2015 6:31 pm
I am trying to override some of the functionality of the News Show Pro GK5 module by creating a template override. I have copied '/modules/mod_news_pro_gk5/tmpl/view.php' to '/templates/gk_musicstate/html/mod_news_pro_gk5/view.php'. I then made the changes that I wanted, but they are not showing up on the rendered page. I make the same changes to original view.php file, and the changes show up, but I want to it the proper way. Other module overrides are working like they should. Anybody have any ideas?
User avatar
Fresh Boarder

teitbite
Sun Nov 15, 2015 2:02 pm
Hi

I'm afraid this one file is kind of a shared file for couple of module styles and because of that it is not allowed to be overwritten. You will have to use a direct module modification as You have it now.
User avatar
Moderator

GK User
Tue Nov 17, 2015 10:21 pm
What I am trying to do is add the .nspHeadLink class back into the a tag in .nspHeader in the header function. Trying to narrow it down by using the a tag instead of the class name complicates the css needlessly in my opinion. If you can add it the class name back in a future update, that would be awesome! This way I wouldn't have to modify view.php every time the module gets updated.
User avatar
Fresh Boarder

teitbite
Thu Nov 19, 2015 2:48 pm
Hi

I cannot add this to release, but maybe using a small script will allow to add it from outside the module. I'll help You with this, but I'll need You to show me exactly where this class should appear.
User avatar
Moderator

GK User
Mon Nov 23, 2015 9:18 pm
In modules/mod_news_pro_gk5/tmpl/view.php on line 47 of News Show Pro GK5 1.9.2.1, I would like to change:
Code: Select all
$output_html .= '<a href="'.$link.'" '.$link_attrs.'>';

to:
Code: Select all
$output_html .= '<a class="nspHeadLink" href="'.$link.'" '.$link_attrs.'>';

Fairly simple.
User avatar
Fresh Boarder

teitbite
Wed Nov 25, 2015 2:32 pm
Hi

That's not what I had in mind. I need to see a result of that on Your site directly so I can come up with a different way to apply that. I'm guessing this script can look something like that, but can't be 100% sure without a code to compare it to.

Code: Select all
<script type="text/javascript">(function($) {$(document).ready(function() {
$('.nspList a').addClass('nspHeadLink');
});})(jQuery)</script>
User avatar
Moderator


cron