Forums / Templates, Stylesheets, Page Layout / Struggling with finding an element which needs to be modified

Struggling with finding an element which needs to be modified

Locked

Views: 835

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
17 Feb 2010, 6:15 AM
#1
smcelligott avatar

smcelligott

New Zenner

Join Date:
Nov 2009
Location:
Sydney Australia
Posts:
84
Plugin Contributions:
0

Struggling with finding an element which needs to be modified

All this will sound silly, but I've been searching for hours for something and can't find it. According to a number of threads, I need to find the class, "imgLink," and then edit that file.

The problem is, I can't find it. I'm new to all of this (ZC1.3.8), and have installed Firebug, and can see that when I edit this element, it does what I want it to do, but for the life of me, I can't find the file defined anywhere.

In one forum I see that I can go to Tools>Developer's Toolkit, which looks to be a cool toy, but I'm not sure how it works. I inserted "imgLink" everywhere, in all six categories, and never files found.

I found another forum where it said this file was in tpl_product_info_display.php, which I eventually located, but there was no reference to the file there.

I suppose the question buried in here is "if I know what I need to change, what is the best method for finding which instance of that element I need to change?"

My site isn't live so can't really show you what I mean, but am hoping some generic advice on using Firebug, or this other Toolkit, will get me on my way.

Your help is hugely appreciated. Sean

Sean M - Sydney, Australia

17 Feb 2010, 7:36 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Struggling with finding an element which needs to be modified

.imgLink is not a file, it is a selector name for a rule that can go in your stylesheet. It is possible that no rule exists yet; if not, you can add a new rule in
/includes/templates/your_template/css/stylesheet.css. Do not touch any PHP files for this.

If you were searching files for .imgLink, you would not find it, because it is written in the PHP files as class="imgLink" without the dot.

17 Feb 2010, 11:23 AM
#3
smcelligott avatar

smcelligott

New Zenner

Join Date:
Nov 2009
Location:
Sydney Australia
Posts:
84
Plugin Contributions:
0

Re: Struggling with finding an element which needs to be modified

Excuse the non-tech jargon, but I think it is somewhere just can't figure out where. Here is why I think it exists. If I right click on the element I want to change (using firebug) I get:

<span class="imgLink">larger image</span>

BTW, have also searched stylesheet.css for the string imgLink, and it is not found. I realise that it is not a file, but a string I'm looking for within a file, but it would seem there would have to be away to locate that string . . . I just can't get my head around it.

Any other ideas?

Sean M - Sydney, Australia

17 Feb 2010, 11:49 AM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Struggling with finding an element which needs to be modified

You were on the right track - searching for 'imglink' in the Developers Tool Kit shows two files:

includes/modules/additional_images.php

and

includes/templates/template_default/templates/tpl_modules_main_product_image.php

17 Feb 2010, 3:14 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Struggling with finding an element which needs to be modified

But you don't want to touch either of those files.

You need to add a rule to your stylesheet like```
.imgLink {your-property: your-value;}

There is no existing rule for .imgLink in the stylesheet, or the Developers Toolkit search would have found it.
17 Feb 2010, 11:19 PM
#6
smcelligott avatar

smcelligott

New Zenner

Join Date:
Nov 2009
Location:
Sydney Australia
Posts:
84
Plugin Contributions:
0

Re: Struggling with finding an element which needs to be modified

Thanks All -- I guess I messed up using Developer's Toolkit. For those of you wanting to use this tool. I found the easiest method was to go to the last search section, "Look-up in all files," and then make sure that you change "All Files Look-ups:" from "none" to "All Files Catalog/Admin."

Showed all three instances on my installation, and then I was careful to modify, and place in corresponding template folders:

i.e.
includes/templates/template_default/templates/tpl_modules_main_product_image.php

was modified and then saved to:

includes/templates/CUSTOM/templates/tpl_modules_main_product_image.php

I think this stuff is starting to sink in . . . thanks again!

Sean M - Sydney, Australia