Magento2 how to upload images in image slider in the home page? - magento

I'm new to magento2, I've been trying to create a site of my own , I decided to download a free theme called "Hidden-techies Next" and configured it in my local system, the theme has an opening image slider in the home page, all I want is to add some images in the image slider, so I went to the block where the image was placed and found out that it was a "CMS block" called "Home Slider" and then i tried to edit the image in the slider and changed it to my onw images, here's the code below
<div class="home-slider-wrapper">
<div class="home-slider-main below-padding">
<ul class="home-slider">
<li><img class="image-responsive middle-block" src="{{media url="wysiwyg/slider/next-home-banner-1.png"}}" alt="home banner"> </li>
<li style="display: none;"><img class="image-responsive middle-block" src="{{media url="wysiwyg/matt-artz-4mAcustUNPs-unsplash.jpg"}}" alt="home banner"> </li>
</ul>
</div>
</div>
But the issue i got in here is when I tried to change the image or add few more images in the slider the slider malfunctions, like the slider is no more a slider but its just few images arranged one below one and the , also if i try reverting my changes and saved them the slider malfunctions anyways, it remains the same without the next button , here's a image of my scenario
https://i.stack.imgur.com/pyded.png
what I want in here is just to add some images into the slider, please help me out on my mistakes, idk what or where I did my mistakes, thanks for any reply's.

Please Go to Admin -> Content -> Pages -> Edit you page.
After that in content tab please click on Show/Hide Editor and check there is some script code available or not if there not then maybe possible you removed slider script code.

Related

magento - images not showing

I added a custom field for all cms pages and enabled text editor and i display the value in a phtml file.
This is working fine,but the images not showing properly,it is not evaluated,it display like as below,
<img style="float: left;" title="Incorrect method of de-coiling " src="{{media url=" wysiwyg="" faqs="" 2-incorrect-method.jpg"}}"="" alt="Incorrect method of de-coiling " width="230">
I display this content via the following code
<?php echo nl2br($post['post_content']); // display content ?>
Please help me to evaluate this content properly,I am new in magento
When adding images using wysiwyg editor button they will be relative to root/media/wysiwyg directory
img src="{{media url="wysiwyg/myfile.jpeg"}}"/>

lightbox, colorbox, and fancybox styling

I am about to use any lightbox, colorbox, or fancybox. However, when I read the documentation for all of them, it looks like the images are displayed as an overlay. What I like to do is display the image in a set div above the thumbnails. So, to explain more, here is a sample of html that I like to have
<div class="selected-image">
<!-- This div will be large in dimentions, and will display the selected thumbnail image -->
</div>
<div class="thumbnails">
<!-- This div will have a list of all the thumbnails available -->
</div>
Clicking on any image inside .thumbnails will result in changing the image in .selected-image
Is it possible to do so? If now, what is the alternative?
Thanks.

Images not showing in views block with drupal 7

I'm completely stuck on this one:
I'm working on a drupal 7 website and I have created a block (view) that should display an image with it. No matter what I try, I cant get the image displayed...
The content type I'm trying to display has 3 fields: "name", "description" and "picture".
The picture simply is an Image that's stored in a folder "myImages".
This is a picture of the block view I'm trying to create:
This does display the fields "title" and "beschrijving" (=description). The "foto" (=picture) however is not displayed... (in chrome it gives the "broken picture" logo, in firefox just nothing).
The wierd thing is: the image appears just for a blink and then disappears, meaning it is actually being rendered.
When I took a look at it with firebug I got following html:
<div class="views-field views-field-field-foto">
<span class="field-content">
<img width="100" height="100" alt="" src="sites/default/files/myImages/imageSource.jpg" typeof="foaf:Image">
</span>
</div>
And when I try to open the image itself (imageSource.jpg) I get an (500) internal server error (but I'm pretty sure this is because of the .gitignore file).
The image path is incorrect. It should look like...
src="/sites/default/files/myImages/imageSource.jpg"
...with the beginning forward slash.
I had issues when displaying images with Views, and it turned out to be the "alt text" option. In order to use "alt text" and not have issues I had to make use of the "Rewrite Results" option in Views.

Magento prototype - Tooltip or modal box when mouseover thumbnails from product page (Color All Module)

I have a Magento online store with Color All module. This module is great and let me put the product options images so that the customer can easily see the possibilities.
Here's an example: http://www.inusual.com.br/poltrona-yan.html
Notice that there are 4 colors thumbnails.
What I want is that when the customer rollover the mouse, the normal image (bigger size) appears, like a tooltip.
I was trying to do it with OpenTip: http://opentip.org/
The problem is that the module is encrypted and the only way to achieve this is to use Prototype to add some attributes to the DIV's.
Here's the code:
<div class="ca-thumbnails">
<div>
<img src="image.jpg">
</div>
<div>
<img src="image2.jpg">
</div>
<div>
<img src="image3.jpg">
</div>
</div>
Seems like should get the 'src' from all imgs and then add attributes to the div so that the tooltip could work.
Does anyone has a clue on how to do this?
Maybe i'm trying the hard way. lol
Thanks in advance
From reading the documentation I think you can do this:
$$('.ca-thumbnails img').each(function(element) {
new Opentip(element, '<img src="' + URL_OF_LARGE_IMAGE + '">');
});
I don't know how you'll get the URL of the target images, perhaps that is something the makers of Color All can help with. Since you paid for their extension they are obliged to support you.

Starting ColorBox slideshow using a link

I would like to have a page with both an image gallery and a slideshow. The slideshow should be started when I click the link, the normal ColorBox should be used when I click one of the images.
What I do now is group all the images with a rel. For the slideshow link I use the following code:
<a rel="slideshow" href="#">Display slideshow</a>
In the configuration for colorbox I define rel as the rel I use for the images. This works almost, the problem I have with this is that I get an extra empty page at the beginning.
How can I start a slideshow of an image gallery, using a text link?
I searched for how to do this for a long time, and finally found the answer on - where else - the F.A.Q for Colorbox. The example is worded a bit differently though so it wasn't as easy to find as you might think. Especially if you're asking question in these terms, like I was.
<div style="display:none;"> <!-- optionally hide this div -->
<a rel="gallery" href="/slideshow/one.jpg">Caption 1</a>
<a rel="gallery" href="/slideshow/two.jpg">Caption 2</a>
<a rel="gallery" href="/slideshow/three.jpg">Caption 3</a>
</div>
<a id="openGallery" href="#">Display slideshow</a>
<script type="text/javascript">
var $gallery = $("a[rel=gallery]").colorbox();
$("a#openGallery").click(function(e){
e.preventDefault();
$gallery.eq(0).click();
});
</script>
http://jacklmoore.com/colorbox/faq/#faq-click

Resources