0
Welcome Guest! Login
0 items Join Now

SOLVED Module Articles Category Override

  • SOLVED Module Articles Category Override

    Posted 7 years 2 weeks ago
    • Hi All,

      I've written a change to the joomla default module 'Aritcles Category' by editing the default.php file for it (/modules/mod_articles_category/tmpl/default.php) to get it to display the intro image for the article floating to the right of the text and it works very nicely.
      This image is hidden for guests.
      Please log in or register to see it.


      However, as I have edited the file directly I know it will probably get overwriten in a future joomla update so I wanted to place it with in the template as an override but I don't know where to stick /mod_articles_category/tmpl/default.php within the template folder for it to work. Please can someone tell me where to 'stick it' (politely).

      I'm using:

      Joomla: 3.6.5
      Template: RT Photon
      Gantry: 5

      Thanks in advance,

      Aran

      p.s if anyone else would like to make the change themselves I simply edited the show_introtext section of the file to look like this:

      <?php if ($params->get('show_introtext')) : ?>
      					<p class="mod-articles-category-introtext">
      					
      						<?php $images = json_decode($item->images); ?>
      <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
      <a href="<?php echo $item->link; ?>"><img width="200" height="41" src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>" class="pull-right item-image" /></a>
      
      						
      						<?php echo $item->displayIntrotext; ?>
      					</p>
      					
      				<?php endif; ?>
    • Last Edit: 7 years 2 weeks ago by Aran Gibbs.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Module Articles Category Override

    Posted 7 years 2 weeks ago
    • The standard Joomla way - there's nothing special about the RT template. https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core .

      Regards, Mark.
    • The following users have thanked you: Aran Gibbs

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Module Articles Category Override

    Posted 7 years 2 weeks ago
    • Thanks MrT... I had forgotten to take the file out of the tmpl directory when I put it in the the HTML folder so I thought there was something different in G5. Working perfectly now.
    • Last Edit: 7 years 2 weeks ago by Aran Gibbs.

Time to create page: 0.060 seconds