0
Welcome Guest! Login
0 items Join Now

Custom clean Homepage

    • stecciu's Avatar
    • stecciu
    • Newbie
    • Posts: 1
    • Thanks: 0

    Custom clean Homepage

    Posted 12 years 3 months ago
    • Hi to all!!
      I'm trying to design a custom homepage, without the use of any of gantry's head declaration such as css stylesheet or any other thing.

      I need to do a custom landing page where I'll put some gantry widget position only. I followed this guide to do a custom template: .
      I even clear all the code in that file having this:
       
      <?php
      /**
       * Template Name: Custom HomePage
       * @version   1.31 December 18, 2012
       * @author    RocketTheme http://www.rockettheme.com
       * @copyright Copyright (C) 2007 - 2012 RocketTheme, LLC
       * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
       */
      // no direct access
      defined('ABSPATH') or die('Restricted access');
       
      global $gantry;
      ?>
      <!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('my_custom_css.css'));
          ?>
      </head>
          <body>
       
              
              <?php $gantry->displayFooter(); ?>
          </body>
      </html>
      <?php
      $gantry->finalize();
      ?>
       

      And it works correctly, the only one thing I can't do is to clear the recall to all the other gantry stylesheet. How can I do it? How can I remove the css link to all ganty's stylesheet from the head section?
      Thank you for your support.

      Stefano

      p.s.: where I can find the Gantry API documentation? I found just some guides in the official site.
      p.p.s.: sorry for my english...
    • Last Edit: 9 years 4 months ago by Kat05.
    • Shazdeh's Avatar
    • Shazdeh
    • Elite Rocketeer
    • Posts: 4984
    • Thanks: 29

    Re: Custom clean Homepage

    Posted 12 years 3 months ago
    • Hi,
      Gantry's CSS files are required to display the grids and layouts properly. If you intend not to use those, you can remove the $gantry calls in the above snippet so that it contains only the markup you want for that particular page and that way nothing from Gantry gets added to page.
    • Please don't PM unless requested ;)
      Consider using the custom stylesheet for all your CSS customizations: gantry-framework.org/documentation/wordp...custom_stylesheet.md .
      Please provide the URL to the issue.
      And please mark the thread as solved if the issue is resolved.
  • Re: Custom clean Homepage

    Posted 12 years 3 months ago
    • Hi,
      Thank you for your reply. If i remove that call all the head tag will be removed, seo items included.
      Is there a way to remove just the css?
      For now thanx a lot!
  • Re: Custom clean Homepage

    Posted 12 years 3 months ago
    • Sorry, wich call do i need to remove?
  • Re: Custom clean Homepage

    Posted 12 years 3 months ago
    • Some suggests?
    • Shazdeh's Avatar
    • Shazdeh
    • Elite Rocketeer
    • Posts: 4984
    • Thanks: 29

    Re: Custom clean Homepage

    Posted 12 years 3 months ago
    • Hi,
      the $gantry calls in the above, like $gantry->displayHead(); and $gantry->addStyles(array('my_custom_css.css')); so you're left with pure HTML, and that will effectively disables Gantry for that page. I've attached a php file with modification so you can grab.
      I'm not really sure why you would need to remove Gantry's stylesheets. If you need to change something, you can simply override the CSS rules in your custom stylesheet. Or you could change the markup of the page in your custom page template so those rules would no longer apply (for example change the "rt-container" class name to something else so that Gantry's would not be applied).
    • Please don't PM unless requested ;)
      Consider using the custom stylesheet for all your CSS customizations: gantry-framework.org/documentation/wordp...custom_stylesheet.md .
      Please provide the URL to the issue.
      And please mark the thread as solved if the issue is resolved.

Time to create page: 0.061 seconds