slick carousel - two rows for specific columns - carousel

I'm using slick carousel and I'm faced with the problem of having multiple rows only on specific columns. Is it possible to do this with slick carousel?
I'm trying to replicate this carousel layout:
As we can see from the image above, this carousel's first and last images are straightforward. However, when we look at the second and third carousel items, we can see these images are in multiple rows.
I understand that slick carousel has a rows function such as this example, but is it possible to only have this feature only for specific columns? If not, would you guys know any other way to accomplish this task?
For context, I'm using the ACF Gallery field (WordPress) to put in the images and using its loop to parse out the images in the front-end like this:
<div class="gallery-carousel">
<?php $index = 1; ?>
<?php foreach( $images as $image ): ?>
<div>
<img
src="<?php echo esc_url($image['url']); ?>"
alt="<?php echo esc_attr($image['alt']); ?>"
/>
<?php echo $index; ?>
</div>
<?php $index++; ?>
<?php endforeach; ?>
</div>
Thank you for your help!

Related

Add opacity to jssor slider nearby visible images

I want to add opacity to the nearby images of a jssor slider.
I found this old one but I cannot get it to work:
jssor nearby slider opacity upcoming photos
especially this part:
<div data-u="slides" id="slideimage-content">
<?php foreach ($sectionImage as $key => $value) {?>
<div data-p="112.50" style="display: none;border-style:none; ">
<img data-u="image" src="<?php echo $value['url'] ?>" style="border-style:none;"/>
<div class="slidecover slidecover<?php echo $key ?> coverdark"></div>
</div>
<?php } ?>
</div>
Jfiddle
https://jsfiddle.net/sLjfu7xc/3/
Thanks
For now, you can add static cover above to make it appear like that.
Download jssor slider dev pack, find the demo ‘examples/overlay-cover.html’.
Btw, we will implement this as built feature later.

How to add a dynamic widget area title

I need some help with an issue.
I have a widget area on my home page with 4 widgets in it.
Each widget has a title, an image and a description.
I want to know how can I add a dynamic title for the whole area, above all the 4 widgets.
The title should be changed by the user in the backend of the widget area.
Here is my code:
<div class="row-fluid">
<h1>The dynamic title should be here</h1>
<?php
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('utility-area') ) : ?><?php endif;
?>
</div>
I hope it all make sense and thank you very much!
<div class="row-fluid">
<h1><?php echo($someDynamicTitleYouveGotFromYourDatabaseOrWhatever); ?></h1>
<?php
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('utility-area') ) : ?><?php endif;
?>
</div>

Yii CActiveForm CheckBox not displayed correctly

I'm new using Yii framework. I show a list a checkbox. But it's not displayed correctly.
Here is what I want: http://imageshack.us/photo/my-images/703/checkboxgood.png
But, here is what I get: http://imageshack.us/photo/my-images/715/checkbox.png
Anyway, here is code I used to generate this view:
<div class="row">
<?php echo $form->labelEx($model,'kat3'); ?>
<?php echo $form->checkBox($model,'kat3'); ?>
?php echo $form->error($model,'kat3'); ?>
</div>
<div class="row">
<?php echo $form->labelEx($model,'kat4'); ?>
<?php echo $form->checkBox($model,'kat4'); ?>
<?php echo $form->error($model,'kat4'); ?>
</div>
I am new to web developing, and understand CSS a bit.
Anyone have a suggestion?
thanks! :)
Yii comes with default CSS classes, and that's what you see.
In order to customize these, you must implement your own custom CSS classes for this section. You may wrap your form into a form-class of yours and define the CSS rules as you wish.

Yii framework, uploading files doesn't work

I have a form and I want to upload a file. here is my code:
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'show-form',
'enableAjaxValidation'=>false,
'htmlOptions' => array('enctype' => 'multipart/form-data'),
)); ?>
<fieldset>
<legend>DATI TECNICI</legend>
<div class="row">
<?php echo $form->labelEx($model,'tec_data_file'); ?>
<?php echo $form->fileField($model,'tec_data_file',array('size'=>45,'maxlength'=>45)); ?>
<?php echo $form->error($model,'tec_data_file'); ?>
</div>
</fieldset>
<?php $this->endWidget(); ?>
</div><!-- form -->
There was nothing added to the database after submitting, I did a bit of debuging with firebug and figured out that filefield generates a code like this:
<input id="ytShow_tec_data_file" type="hidden" name="Show[tec_data_file]" value="">
<input id="Show_tec_data_file" type="file" name="Show[tec_data_file]" maxlength="45" size="45">
and two data are sent by $_POST for tec_data_file (which is my file field in db). The first var is empty (I think it is related to first hidden input). and the second one contains my file. and when I'm assigning the variables to my model for saving:
$modelPhoto->attributes = $_POST['Photo'];
the tec_data_file gets an empty string! So nothing gets uploaded to my db. Anyone have an idea how to solve this? If you need more i
You need something like:
$model = new Photo;
$model->attributes = $_POST['Photo'];
$model->image = CUploadedFile::getInstance($model,'file');
where file is the name of the field.
I haven't tested this, it's from the documentation.

image link in Yii framework

hello friends I am newbie to YII. I have an image . After calling that image in Yii its code like is this
<img class="deals_product_image" src="<?php echo MPFunctions::uploaded_image_url($data->item_display_image()->file_ufilename); ?>" alt="<?php echo $data->name; ?>" />
in general html it is doing like this
<img alt="women jackets" src="files/items/images/4db3b3b6a7c06/womens-jacket-thumb.jpg" class="deals_product_image">
Now I want that this image should be a href link like
<a href="files/items/images/4db3b3b6a7c06/womens-jacket-thumb.jpg img src="files/items/images/4db3b3b6a7c06/womens-jacket-thumb.jpg class="deals_product_image"/> </a>
so for this I used code like this
<?php echo CHtml::link('', array('items/viewslug', 'slug'=>$data->slug)); ?>
But it is not showing any link tag like <a href="">
so can any one tell me what should I do?What should I write in between '' tags?
You should simply give the html for the <img> tag as the first parameter:
$imageUrl = MPFunctions::uploaded_image_url($data->item_display_image()->file_ufilename);
$image = '<img class="deals_product_image" src="'.$imageUrl.'" alt="'.$data->name.'" />';
echo CHtml::link($image, array('items/viewslug', 'slug'=>$data->slug));
By the way, you can use CHtml::image to create the <img> tag as well:
$imageUrl = MPFunctions::uploaded_image_url($data->item_display_image()->file_ufilename);
$image = CHtml::image($imageUrl, $data->name, array('class' => 'deals_product_image'));
echo CHtml::link($image, array('items/viewslug', 'slug'=>$data->slug));