X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   XC5 Homepage layout (https://forum.x-cart.com/showthread.php?t=68702)

RichieRich 02-21-2014 08:52 AM

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.

tony_sologubov 02-27-2014 06:39 AM

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.

RichieRich 02-27-2014 06:58 AM

Re: XC5 Homepage layout
 
Great I will give it a go now! Thank you

RichieRich 02-27-2014 08:07 AM

Re: XC5 Homepage layout
 
Stuck with 3-grid table products. Is there a setting for the amount of columns or an adjustment?

RichieRich 02-28-2014 02:16 PM

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.

tony_sologubov 03-06-2014 07:28 PM

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.

btechbilal 03-07-2014 02:59 AM

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

RichieRich 03-07-2014 04:35 AM

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.

RichieRich 03-07-2014 06:26 AM

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.

tony_sologubov 03-11-2014 02:33 AM

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.


All times are GMT -8. The time now is 06:31 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.