how hide PageContentWrap on frontpage?

Professional Joomla social template with metro design and JomSocial extension support.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Apr 23, 2014 3:43 pm
Reply with quote
Report this post
Hi,

how I hide white stripe only on frontpage?
I have show only Main Menu, Grid (header module position) and Footer Menu (footer) on frontpage. Thats all.
But this I want to hide the front page:
Image
(this is gkPageContentWrap 100px = gkPageContent with padding 60px + gkContent with padding 40px)

I want this to have on all other pages with articles and K2 Articles.
I try it this:
1) do #gkPageContentWrap { display: none !important} in override.css . Yes, this working, but articles do not show.
2) do "nogkPageContentWrap", "noPageContentWrap", gkPageContent" and "nogkPageContent" with "ItemID 640" in Template Features. It did not work.

Thank you for finding the time and help fom me.
User avatar
Junior Boarder

GK User
Wed Apr 23, 2014 5:20 pm
Reply with quote
Report this post
I can help you if you would like to send me your ftp and admin.
Im sure there may be an easier way with gavicks admin but this would also work if you want to try and implement it yourself.

In override.css Add this code and add your css.
Code: Select all
.homePage{ }  This is for the homepage

.homeinner{ } This is if its not homepage


In Administrator, edit your Main Menu, Home, and under " Page Display " add " .homePage"

Now download default.php from your layout folder located here : /templates/template_name/layouts/default.php
You will see the first open and close php tags.. Right before the close tag enter this

Code: Select all
// Homepage Class
  $document=  JFactory::getDocument();
  $app = JFactory::getApplication();
  $menu = $app->getMenu();
  $lang = JFactory::getLanguage();
  $classHomepage = '';
  if ($menu->getActive() == $menu->getDefault($lang->getTag())){
      $classHomepage = 'homePage';
  }else{
      $classHomepage = 'homeinner';
  }


After that you should be good to go.
User avatar
Gold Boarder

GK User
Wed Apr 23, 2014 6:57 pm
Reply with quote
Report this post
Hi, i try it, but I dit not expect that it will be so difficult.
I send you PM.
User avatar
Junior Boarder

GK User
Wed Apr 23, 2014 7:06 pm
Reply with quote
Report this post
Forgot to mention this piece of code which is important. It should be added in the default.php aswell
If you want to add it in the location you described, find it in the php file
Code: Select all
   <div id="gkPageContent" class="gkPage ">

and change it to
Code: Select all
   <div id="gkPageContent" class="gkPage <?php echo $classHomepage;?>">


devsmi wrote:I can help you if you would like to send me your ftp and admin.
Im sure there may be an easier way with gavicks admin but this would also work if you want to try and implement it yourself.

In override.css Add this code and add your css.
Code: Select all
.homePage{ }  This is for the homepage

.homeinner{ } This is if its not homepage


In Administrator, edit your Main Menu, Home, and under " Page Display " add " .homePage"

Now download default.php from your layout folder located here : /templates/template_name/layouts/default.php
You will see the first open and close php tags.. Right before the close tag enter this

Code: Select all
// Homepage Class
  $document=  JFactory::getDocument();
  $app = JFactory::getApplication();
  $menu = $app->getMenu();
  $lang = JFactory::getLanguage();
  $classHomepage = '';
  if ($menu->getActive() == $menu->getDefault($lang->getTag())){
      $classHomepage = 'homePage';
  }else{
      $classHomepage = 'homeinner';
  }


After that you should be good to go.
User avatar
Gold Boarder

GK User
Wed Apr 23, 2014 7:45 pm
Reply with quote
Report this post
Ok Finished, check it out. Let me know if thats what you were looking for
User avatar
Gold Boarder

teitbite
Sat Apr 26, 2014 11:59 am
Reply with quote
Report this post
Hi

Ok. It will work, but there is a simlier way of doing that. In template cenfiguration there is a place to add page class suffix to pages when You know it's ID. ID can be checked in menu manager next to this menu item. You can add a suffix like for example: "frontpage" and than with this code added to override.css disable this part:

Code: Select all
body.frontpage #gkPageContent {
display: none;
}


doing it this way will still makes template updates possible.
User avatar
Moderator

GK User
Sat Apr 26, 2014 12:25 pm
Reply with quote
Report this post
I will have to try your method.. seems much easier :)
User avatar
Gold Boarder

teitbite
Sat Apr 26, 2014 12:47 pm
Reply with quote
Report this post
Hi

I've just thought about even easier, but if You would like to revert it. I bet You will not remember what to do :)

Use custom code module (like K2 tools) attached to frontpage with css code to hide this area.
User avatar
Moderator


cron