Drupal - Use lightbox with Views (Rel attribute) - in output link - image

In Drupal I have two image fields, one to act as a thumbnail and the other the image that will open when the thumbnail is clicked. The only way I could find to link the two was to use the option for "Output this field as a link" and link to the image field.
This works, so when I click the thumbnail it opens the larger image however I would like to use lightbox2 for this task but in the "Output this field as a link" options there is no way to set the "rel" attribute.
Is there a way to either set the rel attribute or invoke the lightbox by setting a class?

you only need a single cck imagefield to get thumbnail plus full image in lightbox: Lightbox2 - How to use with CCK Imagefield and Imagecache.
UPDATE: use the "Lightbox Trigger" Views field of the Lightbox2 development version. step by step:
add both your thumbnail and your image field to your view
mark both of them "Exclude from display". don't check "Output this field as a link" anywhere.
add a "Lightbox trigger" field after both of your image fields
configure the "Lightbox trigger" field:
for "Trigger field", select your thumbnail field
for "Popup", select the Replacement pattern (scroll further down in the view field edit form for all possible replacement pattern) of your image field. for example, in my case, this is [field_image_fid].
now, your view should show your thumbnail image and, clicking on it, should open your full image in a lightbox frame. at least that's what's happening here :)

Related

How to display images without their titles in Drupal 8?

Drupal 8.5.3
I want to display some images in a Views Block in a grid format and without the image title being shown. This is not working and the title is always displayed.
I have created a content type for the images with just the required title field and the image field and I have deleted the body field.
I have set the image label to hidden or "visually hidden" in the content view mode in the "Manage Display" tab for both default and teaser. The label seems to affect only the name of the content type itself not the image title.
I have set the view grid to display only teasers.
I have run drush cr multiple times.
The image titles still show up in the view.I can find no way to turn them off there. However the tile is not displayed in the default view mode on the node page itself. Which ironically is where I want it!
Figured out how to do exclude node tiles from display. You have to use a contrib module such as the appropriately named Exclude Node Title

Magento: SOLR: How to add custom product thumbnail image in auto complete dropdown

I would like to display custom image which is newly created ie., thumbnail attribute. Currently solr displays resized big image(300x200) so its not looks good. I want to display the image of product thumbnail which is proportionally cropped(100x100). Here is the example dropdown i'm getting.
Check your SolrBridge/Solrsearch/Model/Ultility.php file for the method generateThumb() and change the width & height variables.
Possibly you might need to edit the CSS in file skin/frontend/base/default/solrsearch/css/autocomplete.css for the larger thumb to display correctly.

Drupal Image Display with View and Panels

Can anyone please guide me on how do I create a photobox that contains image and I wanted to display that image on landing page.
I have used panel to create landing pages for my website. I need to create 7 different layout for my website.
I am new to Drupal. Any help will be appreciated.
I have created specific image style for my image box by going into "Configuration -> Image Styles.
I have created Content Types for image.
For example lets say, Content type is: "Top Left Image".
I have defined fields called "Image Name" and "Image" into "Top Left Image".
Then I have created one view called " Top Left Imagebox".
In view, I have defined fields called Content: Image.
Formatter: Image
Image Style: Selected specific image style.
Link Image to: Nothing
I have used Rewrite Rule to make a view that displays image or video filed if present.
No Results Behavior: [field_image]
Checked - Hide rewriting if empty
Checked Rewrite the output of this field.
I have defined this view into my Landing Panel Page. But, somehow image is not displaying into the browser.
Thanks for Help!!
It can be because your ad blocker block your images. Anything that comes with names like 'ad' will be blocked be ad blocker browser add-ons.
Try switching it off if you have any enabled.
This is my best guess if you have your images in your view & you have added that view into your panel page.

aspdotnetstorefront - How to change Product image tooltip that shows "Click here for larger image"?

When I mouse over a Product image the tooltip shows "Click here for larger image"
How can we change this to show the product name or image name for better Seo?
This is coming from within the Get Product Image call, Someone suggested I could simply string replace the output in the product XmlPackage and replace the "Click here for larger image" with your better for SEO version... but I need an example of how to do this.
If you login to the Admin section of your storefront, and go to "Configuration -> Localization -> String Resource Manager". Once in string resource manager search for "showproduct.aspx.19". Then just click edit and change it to whatever you want the tooltip to show.

get the name of ckEditor instance

I have three ckEditor instances in my page say a,b,c.Now on click of the image upload button I need to check from which one of a,b,c image upload is getting called.i.e I need the name of the ckEditor instance.
"editor" object has a property "name", you can make use of that.

Resources