0
Welcome Guest! Login
0 items Join Now

Print Popup Style Changes

    • RacerFX's Avatar
    • RacerFX
    • Sr. Rocketeer
    • Posts: 173
    • Thanks: 10

    Print Popup Style Changes

    Posted 13 years 1 week ago
    • I have searched everywhere for answers to this issue, but haven't found the correct answer for RT templates and Gantry.

      Currently, I'm trying to style the print popup on Tachyon template ( stidev.com/index.php ).

      I've tried the developer extensions found on Joomla, changes to the component.php, template.css, adding a print.css and the list goes on. After long hours of getting no where, the culprit seems to be Gantry.

      Joomla has a tutorial on changing the print popups, docs.joomla.org/Customizing_the_print_pop-up . But these changes don't seem to be effective since newer RT templates use Gantry and code is quite different. How would you implement this solution in Gantry?

      Any help would be appreciated. There are quite a few threads in RT forum that lead to a dead end on this subject.
    • David Goode's Avatar
    • David Goode
    • Preeminent Rocketeer
    • Posts: 17058
    • Thanks: 890
    • Web Designer and Host

    Re: Print Popup Style Changes

    Posted 13 years 1 week ago
    • Hi there,SIPP wrote:
      I have searched everywhere for answers to this issue, but haven't found the correct answer for RT templates and Gantry.
      It looks to me that you have found answers and just need to be able to implement them.SIPP wrote:
      Currently, I'm trying to style the print popup on Tachyon template ( stidev.com/index.php ).

      I've tried the developer extensions found on Joomla, changes to the component.php, template.css, adding a print.css and the list goes on. After long hours of getting no where, the culprit seems to be Gantry.
      I'm not quite sure how you come to that conclusion as the pop-up styling is controlled by the template not Gantry.SIPP wrote:
      Joomla has a tutorial on changing the print popups, docs.joomla.org/Customizing_the_print_pop-up . But these changes don't seem to be effective since newer RT templates use Gantry and code is quite different. How would you implement this solution in Gantry?
      If you follow the details on the Joomla link you provide then you will see that component.php is located in the root of the template you are using. In your case /templates/rt_tachyon_j15/component.php

      Here is the actual code...
      <?php
      /**
       * @package Gantry Template Framework - RocketTheme
       * @version 1.5.4 April 10, 2011
       * @author RocketTheme http://www.rockettheme.com
       * @copyright Copyright (C) 2007 - 2011 RocketTheme, LLC
       * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
       *
       * Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
       *
       */
      // no direct access
      defined( '_JEXEC' ) or die( 'Restricted index access' );
       
      // load and inititialize gantry class
      require_once('lib/gantry/gantry.php');
      $gantry->init();
       
      ?>
      <?php if (JRequest::getString('type')=='raw'):?>
          <jdoc:include type="component" />
      <?php else: ?>
          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $gantry->language; ?>" lang="<?php echo $gantry->language;?>" >
              <head>
                  <?php 
                      $gantry->displayHead();
                      $gantry->addStyles(array('template.css','joomla.css','typography.css'));
                  ?>
              </head>
              <body>
                  <div id="rt-main-surround">
                      <div class="rt-container">
                          <div class="rt-block">
                              <div id="rt-mainbody">
                                  <jdoc:include type="component" />
                              </div>
                          </div>
                      </div>
                  </div>
              </body>
          </html>
      <?php endif; ?>
      <?php
      $gantry->finalize();
      ?>
      I think you can see that any pop-up designated as raw will just be displayed in a basic pop-up. If not raw then the pop-up will take its styling from the 3 css sheets called at line 28.

      If you don't want to use RT styling for pop-ups then change the call to your own css sheets. Remember to mark the <div> tags accordingly as they are set to use the template layouts.
      SIPP wrote:
      Any help would be appreciated. There are quite a few threads in RT forum that lead to a dead end on this subject.
      Furthermore, if you search the Joomla forums for print styling you will see that it has always been one of Joomla's shortfalls. I spent ages trying to get a table to print correctly. The rows were alternating backgrounds - white and very light grey - but it always printed white. I found several posts where it was confirmed that the base print to pdf within Joomla just wasn't meant to deliver that level of print quality.

      Hope this helps 8)

    • 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

Time to create page: 0.054 seconds