Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

XC5 Homepage layout

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 02-21-2014, 08:52 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default XC5 Homepage layout

How would I go about changing the homepage only to make it full width? (ie. no left nav on the homepage)

In XC4 it could be acheived with some if statement in the smarty template, but I am not so familiar with the XC5 structure.

Any advice would be helpful.
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #2  
Old 02-27-2014, 06:39 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: XC5 Homepage layout

Hi Richie!

You can achieve it by installing this tiny mod, I've just written:
https://dl.dropboxusercontent.com/u/23858825/Tony-HomePageWithoutSidebar-v5_0_0.tar

After you install it, you will have to tweak CSS styles in order to expand the central area to the full width.
Reply With Quote
  #3  
Old 02-27-2014, 06:58 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default Re: XC5 Homepage layout

Great I will give it a go now! Thank you
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #4  
Old 02-27-2014, 08:07 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default Re: XC5 Homepage layout

Stuck with 3-grid table products. Is there a setting for the amount of columns or an adjustment?
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #5  
Old 02-28-2014, 02:16 PM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default Re: XC5 Homepage layout

The css I can adjust, but the way you edit in the css in look and feel section, means that it will appear the same for the whole website. Therefore the categories I can make 100% width, but then the subcategories will not float to the left with 100% width.
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #6  
Old 03-06-2014, 07:28 PM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: XC5 Homepage layout

Sorry, but there is no setting of defining how many columns should be displayed, but this appearance option can be altered by the mod.

As for CSS rules for the home page only, you can alter the classes/XLite/Module/Tony/HomePageWithoutSidebar/View/Content.php viewer and define there the following method:

Quote:
public function getJSFiles()
{
$result = parent::getJSFiles();

if ('main' == $this->getTarget()) {
$result[] = 'modules/Tony/HomePageWithoutSidebar/css/css.css';
}

return $result;
}

and X-Cart 5 will load this CSS file only for homepage. Of course, in this case, you will need to create the skins/default/en/modules/Tony/HomePageWithoutSidebar/css/css.css file with needed rules.
Reply With Quote

The following user thanks tony_sologubov for this useful post:
RichieRich (03-07-2014)
  #7  
Old 03-07-2014, 02:59 AM
 
btechbilal btechbilal is offline
 

Member
  
Join Date: Feb 2014
Posts: 10
 

Default Re: XC5 Homepage layout

hi thanks tony,
it's really good , may i know what about if i want to show some pages links instead of categories on home main center area?
i want to show some special pages Links on home main center area instead of categories
thanks
__________________
5.0.10
Reply With Quote
  #8  
Old 03-07-2014, 04:35 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default Re: XC5 Homepage layout

I think you could do that by editing the content in Catalog > frontpage. You could hide the categories with some css. Although its not the ideal solution, hopefully there will be a setting soon to hide categories manually.
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #9  
Old 03-07-2014, 06:26 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default Re: XC5 Homepage layout

Quote:
Originally Posted by tony_sologubov

As for CSS rules for the home page only, you can alter the classes/XLite/Module/Tony/HomePageWithoutSidebar/View/Content.php viewer and define there the following method:

public function getJSFiles()
{
$result = parent::getJSFiles();

if ('main' == $this->getTarget()) {
$result[] = 'modules/Tony/HomePageWithoutSidebar/css/css.css';
}

return $result;
}


I could not get it to work after updating the cahce the css did not appear in the homepage, do you have the full Content.php file please.
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #10  
Old 03-11-2014, 02:33 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: XC5 Homepage layout

Quote:
Originally Posted by btechbilal
hi thanks tony,
it's really good , may i know what about if i want to show some pages links instead of categories on home main center area?
i want to show some special pages Links on home main center area instead of categories
thanks

Yes, RichieRich is right, you can achieve it by editing the Front page in admin area.
Reply With Quote

The following user thanks tony_sologubov for this useful post:
ADDISON (07-09-2014)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:36 PM.

   

 
X-Cart forums © 2001-2020