What's New
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Hello,
I use a swiper slider in my home page.
In desktop view, all images have the following dimensions : 400 x 180 pixels
In mobile view, i uploaded images with the following dimensions : 350 x 158 pixels
When i check in mobile view, i still see the “desktop” image (see print screen attached).
Actually i changed the mobile image dimension because, in mobile view, all image sliders were longer than the screen.
Ideally, i would have loved to display (in mobile view) 1 slider and a piece of the next one (like 20-30 pixels). I did not found how to do that, so i decided to change the mobile images.
And it’s not working, so i ask some help please 😉 !!
THanks for your help !
ELvis.
For the purpose of displaying the next one, I suggest you customize the swiper module for a bit, take these steps:
1. Adjust the ps_st_swiper_group table in the database, see the attached 423.
2. Edit the modules\stswiper\classes\StSwiperGroup.php file, see the attached 424
'items_huge' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
'items_xxlg' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
'items_xlg' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
'items_lg' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
'items_md' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
'items_sm' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
'items_xs' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
'items_xxs' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
3. Edit the modules\stswiper\stswiper.php file, see the attached 425.
$html .= '<option value="1.4" '.($slide_group->$item == 1.4 ? ' selected="selected"':'').'>1.4</option>';
$html .= '<option value="2.2" '.($slide_group->$item == 2.2 ? ' selected="selected"':'').'>2.2</option>';
That’s all, you can add any value you like, for example, 1.4 means show one and 2/5 of the next image out.
You must be logged in to reply to this topic.