How can I add a cart image in my navigation bar? - image

I am trying to add an image of a cart after my "Cart" button in navigation bar.
Can anyone help me in doing so? I am using Weebly to create my website.
Here is my website: http://poloniafoods.weebly.com/
Thanks in advance,
Justin.

If you want a static nav bar with image buttons for "Home, Account, Checkout, etc." Then follow the below steps..
Create the individual button images. These should all be the same height. Each one is a separate image and is labeled "Home" for example.
Upload each of your buttons to your template's "images" folder. For example: "includes/templates/classic/images/"
Open the "tpl_header.php" file for the template you're using. For example: "includes/templates/template_default/common/tpl_header.php"
Find the line of code that reads
PHP Code: <?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>
On the next line, insert this code:
PHP Code:
<!-- begin navTabs navigation -->
Repeat the portion of code for each button link. You of course have to customize the link destination and the image location for each. The Width and Height should also match the dimensions of that particular image.
After this, you can use your stylesheet.css and other template files to align everything, and it should work!

Related

How to display thumbnail in BREAD browse mode with Voyager Laravel Admin

I have a model with name : Category, which has a field is "image_url" (suppose that it's a big photo). How do I only show thumbnail image in BREAD browse mode of Category?
Thank you!
I ended up overriding the default Voyager bread view for the one table, as per https://docs.laravelvoyager.com/customization/overriding-files#overriding-bread-views
.. which says for version 1.1:
You can override any of the BREAD views for a single BREAD by creating
a new folder in resources/views/vendor/voyager/slug-name where
slug-name is the slug that you have assigned for that table. There are
4 files that you can override:
browse.blade.php
edit-add.blade.php
read.blade.php
order.blade.php
Alternatively you can override the views for all BREADs by creating
any of the above files under resources/views/vendor/voyager/bread
.. I just needed to override the 'browse' view. I also created a custom formfield as per https://docs.laravelvoyager.com/customization/adding-custom-formfields - the code for which just returned an <img> element with the src url correctly formatted.
Finally, in the custom 'browse' view, I added logic to check for the new formfield and returned code to display the image.
Would be SO good if there was another 'Optional Details' field in the BREAD editor for formatting the display in the browse page.
Anyway, hope that helps and I hope someone can point me in the direction of a more straightforward way of doing this ..
You don't actually need to override the template to show the image(s) in browse mode.
In the field settings, just add "show_as_images":true, and it will show the images in browse mode.
According to documents: https://voyager-docs.devdojo.com/bread/introduction-1

Magento category view next and previous page toolbar

Whomever worked on the site previous me has somehow turned off the toolbar on the category view page. They had wanted to get rid of the filter by, and other options.
Now we have too many products to display them all on one page, so I went ahead and limited it to show 12 products, which it does. But now navigation shows up. I assume this is because of how they turned off the toolbar. Where do I find the code (using a theme) to control this toolbar? I am hoping they just commented out the code.
Magento 1.9.3.3
there is also a possibility to remove toolbar in layout xml.
most common place for this would be local.xml of the Theme
app/design/frontend/[theme]/layout/local.xml
can also be done in any other xml (like catalog.xml) in
app/design/frontend/[theme]/layout/
simply search for product_list_toolbar block and actions like remove or unsetChild
over ride the below given files into your theme
app/design/frontend/base/default/template/catalog/product/list.phtml
and you can see the code that call child html of tool bar
in line numbers 42 and 125 for bottom side
<?php echo $this->getToolbarHtml() ?>
so if you commented this line then corresponding tool bars not shows
or if you want to customize the tool bar part then you can edit in the file.
app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml
this file is render for toolbar

Pin It hover on single image?

do you know if its possible to have the pint it mouse over on a single image? right now I use this:
<!-- Please call pinit.js only once per page -->
<script type="text/javascript" async data-pin-hover="true"
src="//assets.pinterest.com/js/pinit.js"></script>
But that is placing a pint it on every image on that page, I just have 3 or 4 images that needs the hover action, not all the whole images in that page, any idea guys?
Thanks!
From looking at the pinterest documentation, I think by default it wants to put a pinit button on everything. So to exclude images, you have to add the exclude specifically on every image for which you do not want the image to appear:
data-pin-no-hover="true"
https://developers.pinterest.com/on_hover_pin_it_buttons/
With JQuery I just did the following since I set the following pinterest attribute on all the images I wanted the save button to show up on...
//remove Pinterest save button for all images
$("img").attr("data-pin-no-hover", true);
//add it back to images for which I've defined the pinterest image
$("img[data-pin-media]").removeAttr("data-pin-no-hover");

image display in drupal

i would like to create an image gallery on my homepage in drupal. Each image will have been uploaded by the user, and, as i understand it, will be saved in some image directory folder in drupal. My question concerns a recent tip i picked up in response to the general debate whether or not it is good to store images as blob in mysql. The tip was to store the filenames of the images in mysql so you can essentially still sort the files. I was wondering whether this would be possible even if the files url is in drupal so to speak. It should be possible shouldn't it? I new to programming you see and want to the images on my homepage to be periodically refreshed according to a define sorting function. I would greatly appreciate any response to this question. Cheers.
You can using content types and views module for create gallery in Drupal 7.
First create new content type with gallery name(admin/structure/types/add).
Then add a image field to gallery content type and save it.
If you want have thumbnail of image you should create a image style. for example create a image style with thumbnail_custom name and add suitable effect(admin/config/media/image-styles/add). You will use of this image style in views in the next step.
Then create a new view with gallery-view name. uncheck create a page, check create a block, enter block title and item per page you want(admin/structure/views/add).
In Filter criteria from block details add content type gallery.
In Fields add Content image that appears in node:gallery and select and select thumbnail_custom for image style option.
Save view.
This view block appears in Blocks section and you select region for it.
If you want this block appears only in the front page, in configuration of this block in the section pages of visibility settings check "Only the listed pages" option and then enter "<front>" phrase in textarea.

Drupal gallery with thumbnail made of first picture

I have drupal6,cck,views,imagecache.
category_type gallery contain a CCK node reference to a category_type images
and In this Images there is a cck file (image) field.
I know how to create a view which will display a list of galleries.
BUT question is .. HOW can I display a list of galleries with a THUMBNAIL that is made of first image available inside that gallery.
And I don't want to add a extra field for gallery (in category_type) like "preview pic"
Just want then to be displayed by reference.
Example:
If I create a gallery with one picture inside... I want this picture to be my gallery thumbnail.
If I create a gallery without image, there will be no thumbnail ... or default "notavailable" picture.
IF I create a galleyr with many images / remove them /etc.. wanna make sure that first available picture in gallery is gonna be it's thumbnail.
please help ;)
You might be able to do this in a view, but if you want even your basic gallery node to show an image from one of the child nodes you could do something like this in a file called node-gallery.tpl.php where gallery is the content type machine name:
// load the node reference
if ($child = node_load($node->field_nr_child[0]['nid'])):
// ... and just print the image from that child node
print $child->field_image[0]['view'];
endif;
You could also randomize which child you show or show only the most recent child with some foreach fun. You might want to override where the content is displayed so you have more control over formatting but this should get you started.
You can also check out this great screencast I just found looking for something else. I think it does exactly what you want without the custom code: http://www.lullabot.com/articles/photo-galleries-views-attach
In CCK image field you must set Default Image ("notavailable" picture).
After this you can:
1. theme node as Jeremy Heslop sayd - node theming;
2. if you make views of Gallery by row style="Fields', then click link on Theme:Information, select appropriate theming file, add it to theme folder, and theme one field (for example, Title) changing it to thumbnailed and linked image (taked from referenced "Images");
3. In Views add Relationships, that will connect "Gallery" with "Images", and show 1 image in field.

Resources