Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / zen_href_link question: Link to nothing required

zen_href_link question: Link to nothing required

Locked

Views: 1,010

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
27 May 2007, 2:27 PM
#1
miriam_t avatar

miriam_t

New Zenner

Join Date:
May 2007
Posts:
38
Plugin Contributions:
0

zen_href_link question: Link to nothing required

Hello zencart aces out there...

I am working my way through our first installation. Currently i'm doing the products info page. I already installed the image handler 2 which provides me with some admin possibilities which I want to use for the products_info_display-page...

What i try to achieve is a css-styled output of a small gallery. I picked one from the fabulous Mr. Nicholls (cssplay.co.uk) (link to a sample: http://www.cssplay.co.uk/menu/gallery_click.html )

I managed to use it in a sample layout of our planned shop (which is not online yet...). I also managed to add a file /include/modules/additional_images2.php which collects the needed data in the needed order and with the css-additions.

The gallery works with a href links and image tags. The a href links get a background-image and a #nogo target, to show on the very same page. The image tag is used with css-styling to show on click on the link, but stay invisible if not clicked.
My example works quite well, the images are inserted correctly and are placed on click, just like in the sample - but: every click on a thumbnail sends me back to the main page, because i didn't manage to make a correct reference to the same page... I do not need a popup and I do not need a link to the big image - i need an anchor link to the same page...

So the question is: How do I achieve the link to the product_info_display - page... with the additional #nogo, so that only my image shows up and not the page reloads completely... its really like an anchor-link on this page, but the zencart-way...

Any hints are appreciated... and if someone is interested in the changes I made, I will post them here...

Thanks in advance!

Miriam

28 May 2007, 8:10 AM
#2
miriam_t avatar

miriam_t

New Zenner

Join Date:
May 2007
Posts:
38
Plugin Contributions:
0

Re: zen_href_link question: Link to nothing required

Ok, looking in the forum with a better search term as before helped me out... In this thread my solution is named: http://www.zen-cart.com/forum/showthread.php?t=52664&highlight=anchor

So I inserted the following into my newly created additional_images2.php:

$css_link = '<a href="'. zen_output_string_protected($_SERVER['REQUEST_URI']).'#"'. '" class="gallery"'.' style="background:url('. $small_image. ')">' . '<em>' . $image_large . '</em></a>';

and everything is fine for the moment ... :wink:

Now I only have to find out how to get an additional tpl_main_page.php for the products... because I want to override the normal tpl_main_page to rearrange my product informations (the new gallery is consuming too much space)... or should I simply change the gallery... anyway, ZenCart is really great... I'm advancing... :smile:

Greets, Miriam