Graphic link:

General ShopSite user discussion

Graphic link:

Postby kastlebrick » Tue May 18, 2010 3:53 pm

I'm trying to find the proper way to write a code, using the "graphic link:" option, so when a person is viewing the store website page, the current page's menu button appears to be glowing. (I have both buttons, regular and glowing/and them combined one under the other as well if needed.)

the hosting Co. currently doesn't support javascript.. I've had an issue with that for customer the log-in:$

as it stands, shopsite calls up the page buttons associated with the page you are viewing.. all pages the same template.

http://volcanodeluxe.com/store/page55.html
Kastlebrick
kastlebrick
 
Posts: 25
Joined: Tue May 18, 2010 3:18 pm
Location: the WB

Postby BFChris » Tue May 18, 2010 7:41 pm

So, you're not looking for a mouse over change of the image....you want it to be based on the specific page you are on?

If you want it to update dynamically (without having to code the menu differently for each page), you'd need some type of script to check the current page and display the appropriate image.

What do you mean that your host doesn't support Javascript? Javascript appears to be working, or your customer registration links wouldn't work right.
~~Barefoot Chris
--------------------------------
Barefoot Chris Web Design
www.barefootchris.net
--------------------------------
BFChris
 
Posts: 322
Joined: Mon Oct 09, 2006 3:28 pm
Location: PA

Postby kastlebrick » Wed May 19, 2010 6:24 am

BFChris wrote:So, you're not looking for a mouse over change of the image....you want it to be based on the specific page you are on?

That is correct Chris.

BFChris wrote:If you want it to update dynamically (without having to code the menu differently for each page), you'd need some type of script to check the current page and display the appropriate image.

what script would that be and where do I put the button? I'm a noob and teaching myself/learning as I go

BFChris wrote:What do you mean that your host doesn't support Javascript? Javascript appears to be working, or your customer registration links wouldn't work right.

I used the Javascript Shopsite provided, but when I log in(I created an account to see how it works) it doesn't show me logged in on the website, it does however show, I'm logged in, in the back of the store "preview page" which is hosted on shopsite..

So is the Javascript shopsite provided not written correctly?
p.s.. I contacted support to address this issue, unfortunately the won't help with the menu button code issue
Kastlebrick
kastlebrick
 
Posts: 25
Joined: Tue May 18, 2010 3:18 pm
Location: the WB

Postby Jim » Wed May 19, 2010 7:52 am

Registration requires the use of cookies to keep track of the login information. Cookies can only be read by the domain that creates them. When I click on the Register or Sign in links on the page http://volcanodeluxe.com/store/page59.html I am taken to the domain
http://shopsite.dot5hosting.com/... . So the cookie for the registration is being created by shopsite.dot5hosting.com and your store pages are at volcanodeluxe.com this means that you store pages will not be able to know that the shopper has logged in.

It also means that the Minicart feature will not work on your store since it also requires use of cookies.

The only way you can get these features to work is to have your shopping cart and registration screens at the volcanodeluxe.com domain. That requires that you have a secure certificate for your own domain and that it is installed properly on the server. I don't know if dot5hosting will allow this or not so you will have to contact them.

As far as changing the link image for the page you are on you could probably do that by putting code in the [-- DEFINE LINK_TO_PAGE --] section of the template to check if the current page is the one the link is being generated for and substitute the glowing button in that case. You will probably need to set up a VAR in the template before the loop links code that sets the page and then in the [-- DEFINE LINK_TO_PAGE --] section compare that to the link that is being generated.

On the issue of Javascript that is all done on the shoppers browser so your host does not need to support it. It it were Java then the code would be on your hosts machine as well as the shoppers. This is probably what your host does not allow.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby kastlebrick » Wed May 19, 2010 12:26 pm

thanks for the info Jim.... I see what you are saying about Javascript.

Jim wrote:As far as changing the link image for the page you are on you could probably do that by putting code in the [-- DEFINE LINK_TO_PAGE --] section of the template to check if the current page is the one the link is being generated for and substitute the glowing button in that case. You will probably need to set up a VAR in the template before the loop links code that sets the page and then in the [-- DEFINE LINK_TO_PAGE --] section compare that to the link that is being generated.



I was thinking this was the case, yet, I have not been able to find a code that would use the glowing button in place of button it calls up.

any ideas as to what I can do or where I may find it?


the search continues.....
Kastlebrick
kastlebrick
 
Posts: 25
Joined: Tue May 18, 2010 3:18 pm
Location: the WB

Postby Jim » Wed May 19, 2010 1:18 pm

Here is one way that you could change the link image to be different on the page that the link is to.
First I include the name of the glowing image in the extra page field 1.

In the Page template in the [-- DEFINE PAGE --] section just before the [-- LOOP LINKS --] tag add
Code: Select all
 [-- VAR.pagename page.name --]

This creates a VAR called pagename and assigns the name of the current page to it.
So the code for the links section with the above would be
Code: Select all
[-- VAR.pagename page.name --]
[-- LOOP LINKS --]
 [-- LINK --]
[-- END_LOOP LINKS --]

In the Page template that is used for the link (normally this is the same template but could be different if you specify the template name in the [-- Link --] tag in the Loop links section) add the following just below the [--DEFINE LINK_TO_PAGE--] tag
Code: Select all
[-- if VAR.pagename page.name --]
<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]" <img src="[-- OUTPUT_DIRECTORY_URL --]/media/[-- page.field1 --]" alt="is my test working" border="5" hspace="3" vspace="3" ><br>
[-- else --]
and just before the [--END_DEFINE LINK_TO_PAGE--] add
Code: Select all
[-- end_if --]

So the define for the links would look like

Code: Select all
[--DEFINE LINK_TO_PAGE--]
[-- if VAR.pagename page.name --]
<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]" <img src="[-- OUTPUT_DIRECTORY_URL --]/media/[-- page.field1 --]" alt="is my test working" border="5" hspace="3" vspace="3" ><br>
[-- else --]
.
.
.
... what ever code you are currently using to create the links.
.
.
.
[-- end_if --]
[--END_DEFINE LINK_TO_PAGE--]


Now when you generate your pages the glowing image will appear on the pages when that page is viewed and on other pages the regular image will be displayed.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby kastlebrick » Wed May 19, 2010 5:48 pm

Jim, I see where you were going with that but, as it was.. I added it in(even changed a few things), it didn't change anything.

I was wondering if Capital Letters would have made a difference!?! <~which I also tried changing.

Here is the [-- DEFINE LINK_TO_PAGE --] section
[-- DEFINE LINK_TO_PAGE --]
[-- VAR.link_made "no" --]
[-- IF PAGE.TextWrap "On" --]
[-- IF PAGE.LinkGraphic --]
<center><a class="link_image" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]"><img class="link_image" align="center" [-- PAGE.LinkGraphic REMOVE_HTML --] alt=""></a></center>
[-- VAR.link_made "yes" --]
[-- END_IF --]

[-- IF PAGE.LinkName --]
<a class="link_name" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.LinkName --]</a>
[-- VAR.link_made "yes" --]
[-- ELSE --]
[-- IF VAR.link_made "no" --]
[-- IF PAGE.LinkText --]
#<!-- do nothing -->#
[-- ELSE --]
[-- IF PAGE.Name --]
<a class="link_name" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.Name --]</a>
[-- ELSE --]
<a class="link_name" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.FileName --]</a>
[-- END_IF --]
[-- VAR.link_made "yes" --]
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]

[-- IF PAGE.LinkText --]
[-- IF PAGE.LinkName --]
<br>
[-- END_IF --]
[-- IF VAR.link_made "yes" --]
<span class="link_text">[-- PAGE.LinkText --]</span>
[-- ELSE --]
<a class="link_text" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.LinkText --]</a>
[-- VAR.link_made "yes" --]
[-- END_IF --]
[-- END_IF --]
[-- ELSE --]
<table class="link">
<tr>
[-- IF PAGE.LinkGraphic --]
[-- IF PAGE.LinkText --]
<td rowspan="2" class="link_image"><a class="link_image" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]"><img class="link_image" align="center" [-- PAGE.LinkGraphic REMOVE_HTML --] alt="[-- IMAGE PAGE.LinkGraphic --]"></a></td>
[-- ELSE --]
<td class="link_image"><a class="link_image" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]"><img class="link_image" align="left" [-- PAGE.LinkGraphic REMOVE_HTML --] alt="[-- IMAGE PAGE.LinkGraphic --]"></a></td>
[-- END_IF --]
[-- VAR.link_made "yes" --]
[-- END_IF --]
[-- IF PAGE.LinkName --]
<td class="link_name"><a class="link_name" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.LinkName --]</a></td>
[-- VAR.link_made "yes" --]
[-- ELSE --]
[-- IF VAR.link_made "no" --]
[-- IF PAGE.LinkText --]
#<!-- do nothing -->#
[-- ELSE --]
<td class="link_name"><a class="link_name" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.FileName --]</a></td>
[-- VAR.link_made "yes" --]
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]
</tr>
[-- IF PAGE.LinkText --]
<tr>
<!-- td spans from previous row -->
[-- IF VAR.link_made "yes" --]
<td class="link_text">[-- PAGE.LinkText --]</td>
[-- ELSE --]
<td class="link_text"><a class="link_text" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.LinkText --]</a></td>
[-- VAR.link_made "yes" --]
[-- END_IF --]
</tr>
[-- END_IF --]
</table>
[-- END_IF --]

[-- IF VAR.link_made "no" --]
<a class="link_name" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">Something's Not Right</a>
[-- VAR.link_made "yes" --]
[-- END_IF --]
[-- END_DEFINE LINK_TO_PAGE --]


maybe this will help your thoughts.. I do appreciate the efforts!!
Kastlebrick
kastlebrick
 
Posts: 25
Joined: Tue May 18, 2010 3:18 pm
Location: the WB

Postby Jim » Wed May 19, 2010 8:50 pm

Here are a couple questions that need to be answered before I can decide what to recommend.

1. Are you making this template for a particular store or are you trying to make it generic so it would work on any store?
2. Will you always have link graphics for every page?
3. Will you always have link text for every page?
4. Do you want to display just the link graphic if it exists or do you need to display the Link Text and link graphic.
5. Did you make the changes exactly as I specified?
6. In the [-- LINK --] tag was there a template name specified? If so did you change that to match the name of the template you are modifying?
7. Did you change all your pages to use your modified template?

To test and see if this would actually work I added the code I mentioned previously to a copy of the awesome_orange_001_pa_template.sst page template which I called "awe". (Your store page was using the awesome orange template when I looked at it so I assume that is where you got the code you posted.)

I modifed the [-- DEFINE LINK_TO_PAGE --] in two places (at the top)
Code: Select all
[-- DEFINE LINK_TO_PAGE --]
[-- VAR.link_made "no" --]

to
Code: Select all
[-- DEFINE LINK_TO_PAGE --]
[-- if VAR.pagename page.name --]
<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]" <img src="[-- OUTPUT_DIRECTORY_URL --]/media/[-- page.field1 --]" alt="is my test working" border="5" hspace="3" vspace="3" ><br>
    [-- VAR.link_made "yes" --]
[-- else --]
[-- VAR.link_made "no" --]
and at the bottom of the [-- DEFINE LINK_TO_PAGE --]
Code: Select all
 [-- END_IF --]

[-- END_DEFINE LINK_TO_PAGE --]
to
Code: Select all
 [-- END_IF --]
[-- end_if --]
[-- END_DEFINE LINK_TO_PAGE --]


I modified the [-- DEFINE PAGE --] section of the template around the Loop Links section from
Code: Select all
        [-- LOOP LINKS 1 --]
          <td class="menu_button"><table class="menu_button">
            <tr class="menu_button_row_1">
              <td class="menu_button_1a"></td>
              <td class="menu_button_1b"></td>
              <td class="menu_button_1c"></td>
            </tr>
            <tr class="menu_button_row_2">
              <td class="menu_button_2a"></td>
              <td class="menu_button_content">[-- LINK awesome_orange_001_pa_template.sst --]</td>
              <td class="menu_button_2c"></td>
            </tr>
            <tr class="menu_button_row_3">
              <td class="menu_button_3a"></td>
              <td class="menu_button_3b"></td>
              <td class="menu_button_3c"></td>
            </tr>
          </table></td>
        [-- END_LOOP LINKS --]
to
Code: Select all
  [-- VAR.pagename page.name --]
      [-- LOOP LINKS 1 --]
          <td class="menu_button"><table class="menu_button">
            <tr class="menu_button_row_1">
              <td class="menu_button_1a"></td>
              <td class="menu_button_1b"></td>
              <td class="menu_button_1c"></td>
            </tr>
            <tr class="menu_button_row_2">
              <td class="menu_button_2a"></td>
              <td class="menu_button_content">[-- LINK awe --]</td>
              <td class="menu_button_2c"></td>
            </tr>
            <tr class="menu_button_row_3">
              <td class="menu_button_3a"></td>
              <td class="menu_button_3b"></td>
              <td class="menu_button_3c"></td>
            </tr>
          </table></td>
        [-- END_LOOP LINKS --]

I added the name of my "glowing" image to the page field 1 field for the various pages.

Using the Power Edit feature I changed all pages to use the new "awe" template. I also made sure that the page was assigned to itself so a link to the page would be included on the page.

I published and things worked as I expected, When I was on a page, that page's link image was the one set in the page field1 area and when I was on a different page the link image was the one defined in the Link Graphic: section.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby kastlebrick » Thu May 20, 2010 5:28 am

Jim wrote:To test and see if this would actually work I added the code I mentioned previously to a copy of the awesome_orange_001_pa_template.sst page template which I called "awe". (Your store page was using the awesome orange template when I looked at it so I assume that is where you got the code you posted.)


Jim I apologize, they are having an issue with the "Add to Cart" button and the "View Cart" button located next to the product..
So I created a support ticket and this was the response..


Hello Jeff,

I went to website and viewed source code and I see this message:

THIS TEMPLATE IS DEPRICATED AND IS NO LONGER MAINTAINED
The Awesome Orange templates now support multiple color
schemes, and should be used instead of this template. Can you try changing the template and see if that resolves the problem.

Sincerely,

Debbie S.
Technical Specialist


I left up the AWESOME_ORANGE so they could see my template wasn't the issue.. sorry for any inconvenience.
Kastlebrick
kastlebrick
 
Posts: 25
Joined: Tue May 18, 2010 3:18 pm
Location: the WB

Postby kastlebrick » Thu May 20, 2010 5:44 am

here is the two area's in question...

[-- DEFINE LINK_TO_PAGE --]
[-- VAR.link_made "no" --]
[-- IF PAGE.TextWrap "On" --]
[-- IF PAGE.LinkGraphic --]
<center><a class="link_image" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]"><img class="link_image" align="center" [-- PAGE.LinkGraphic REMOVE_HTML --] alt=""></a></center>
[-- VAR.link_made "yes" --]
[-- END_IF --]

[-- IF PAGE.LinkName --]
<a class="link_name" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.LinkName --]</a>
[-- VAR.link_made "yes" --]
[-- ELSE --]
[-- IF VAR.link_made "no" --]
[-- IF PAGE.LinkText --]
#<!-- do nothing -->#
[-- ELSE --]
[-- IF PAGE.Name --]
<a class="link_name" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.Name --]</a>
[-- ELSE --]
<a class="link_name" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.FileName --]</a>
[-- END_IF --]
[-- VAR.link_made "yes" --]
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]

[-- IF PAGE.LinkText --]
[-- IF PAGE.LinkName --]
<br>
[-- END_IF --]
[-- IF VAR.link_made "yes" --]
<span class="link_text">[-- PAGE.LinkText --]</span>
[-- ELSE --]
<a class="link_text" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.LinkText --]</a>
[-- VAR.link_made "yes" --]
[-- END_IF --]
[-- END_IF --]
[-- ELSE --]
<table class="link">
<tr>
[-- IF PAGE.LinkGraphic --]
[-- IF PAGE.LinkText --]
<td rowspan="2" class="link_image"><a class="link_image" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]"><img class="link_image" align="center" [-- PAGE.LinkGraphic REMOVE_HTML --] alt="[-- IMAGE PAGE.LinkGraphic --]"></a></td>
[-- ELSE --]
<td class="link_image"><a class="link_image" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]"><img class="link_image" align="left" [-- PAGE.LinkGraphic REMOVE_HTML --] alt="[-- IMAGE PAGE.LinkGraphic --]"></a></td>
[-- END_IF --]
[-- VAR.link_made "yes" --]
[-- END_IF --]
[-- IF PAGE.LinkName --]
<td class="link_name"><a class="link_name" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.LinkName --]</a></td>
[-- VAR.link_made "yes" --]
[-- ELSE --]
[-- IF VAR.link_made "no" --]
[-- IF PAGE.LinkText --]
#<!-- do nothing -->#
[-- ELSE --]
<td class="link_name"><a class="link_name" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.FileName --]</a></td>
[-- VAR.link_made "yes" --]
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]
</tr>
[-- IF PAGE.LinkText --]
<tr>
<!-- td spans from previous row -->
[-- IF VAR.link_made "yes" --]
<td class="link_text">[-- PAGE.LinkText --]</td>
[-- ELSE --]
<td class="link_text"><a class="link_text" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- PAGE.LinkText --]</a></td>
[-- VAR.link_made "yes" --]
[-- END_IF --]
</tr>
[-- END_IF --]
</table>
[-- END_IF --]

[-- IF VAR.link_made "no" --]
<a class="link_name" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">Something's Not Right</a>
[-- VAR.link_made "yes" --]
[-- END_IF --]
[-- END_DEFINE LINK_TO_PAGE --]



[-- LOOP LINKS 1 --]
<td class="menu_button_content">[-- LINK --]</td>
[-- END_LOOP LINKS --]


p.s.. I've changed the store back to my template.
Kastlebrick
kastlebrick
 
Posts: 25
Joined: Tue May 18, 2010 3:18 pm
Location: the WB

Postby Jim » Thu May 20, 2010 7:40 am

Please answer these questions as it will greatly affect how I answer.
1. Are you making this template for a particular store or are you trying to make it generic so it would work on any store?
2. Will you always have link graphics for every page?
3. Will you always have link text for every page?
4. Do you want to display just the link graphic if it exists or do you need to display the Link Text and link graphic.
5. Did you make the changes exactly as I specified?
6. In the [-- LINK --] tag was there a template name specified? If so did you change that to match the name of the template you are modifying?
7. Did you change all your pages to use your modified template?

For question 5.I don't see the changes that I mentioned in previous emails in the code you just posted.
For question 6. I don't see a template name in the Link code you posted. That is fine but you must ensure that all pages are using the same template and that you have the appropriate code in the define links to page section of this template. Also I don't see the code to define the VAR used for the page name which should be just before the {-- LOOP LINKS --]

All of the IF PAGE.xx code in the template is unnecessary unless you are writing this template for use by another store or for sale. It is way more complicated than it needs to be. If you will answer the questions I'll try to simplify it for you.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby kastlebrick » Thu May 20, 2010 9:11 am

1. Are you making this template for a particular store or are you trying to make it generic so it would work on any store?

it is just for the Volcano store.
2. Will you always have link graphics for every page?

yes
3. Will you always have link text for every page?

..besides exterior links (I.E. Tribal Info/Tribal Contact ect...) no, the menu buttons in this case will be images
4. Do you want to display just the link graphic if it exists or do you need to display the Link Text and link graphic.

just the link graphic
5. Did you make the changes exactly as I specified?

Yes, I believe I did.
For question 5.I don't see the changes that I mentioned in previous emails in the code you just posted.

I had made a copy w/o the changes you suggested, and when the changes I made didn't work... I started back fresh.

6. In the [-- LINK --] tag was there a template name specified? If so did you change that to match the name of the template you are modifying?

no, there was no template specified. To started my custom template I made a copy of the awesome_blue_001_pa_template.sst and made the changes accordingly to keep things like [-- LINK --] written properly.

7. Did you change all your pages to use your modified template?

Yes, as well as the checkout and search pages

Jim wrote:If you will answer the questions I'll try to simplify it for you.

that would be GREATLY appreciated!!
Kastlebrick
kastlebrick
 
Posts: 25
Joined: Tue May 18, 2010 3:18 pm
Location: the WB

Postby Jim » Thu May 20, 2010 10:57 am

For the [-- DEFINE LINK_TO_PAGE --] section of the template use this:
Code: Select all
[-- DEFINE LINK_TO_PAGE --]
[-- if VAR.pagename page.name --]
<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]" <img src="[-- OUTPUT_DIRECTORY_URL --]/media/[-- page.field1 --]" alt="[-- page.field1 --]"  >
[-- else --]
<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]"> [-- PAGE.LinkGraphic --]
[-- END_IF --]
<br>
[-- END_DEFINE LINK_TO_PAGE --]


For the loop links section in the [-- DEFINE PAGE --] section of the template use:
Code: Select all
[-- VAR.pagename page.name --]
<table >
[-- LOOP LINKS  --]
   <tr>
      <td class="your_class">[-- LINK --]</td>
   </tr>
[-- END_LOOP LINKS --]
</table>

This assumes that the "glowing" image is placed in the custom page field1 for all pages.
You can add style classes to the < td> <table> <a href...> as needed.

The ShopSite template tags are not case sensitive so [-- LOOP LINKS --] would be the same as [-- Loop Links --] or [-- loop links --]. The <table> <tr><td> could be replaced with <div> codes.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby kastlebrick » Thu May 20, 2010 1:02 pm

Well, Jim that worked... I SOOOO appreciate your help and advice

I had to change a few things.. as I was getting a...


NORMAL BUTTON


alt"

GLOW BUTTON

">


NORMAL BUTTON

NORMAL BUTTON

NORMAL BUTTON

So I did this....


[-- DEFINE LINK_TO_PAGE --]
[-- if VAR.pagename page.name --]
<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]" <img src="[-- OUTPUT_DIRECTORY_URL --]/media/[-- page.field1 --][-- page.field1 --]
[-- else --]
<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]"> [-- PAGE.LinkGraphic --]
[-- END_IF --]
[-- END_DEFINE LINK_TO_PAGE --]


the thing I have to figure out now, is how to make them active again. I was using this..

img.link_image {
border: 0px none;
}
img.link_image:active {
position:relative;
top:2px;
left:2px;
}



again, thank you, thank you
Kastlebrick
kastlebrick
 
Posts: 25
Joined: Tue May 18, 2010 3:18 pm
Location: the WB

Postby Jim » Thu May 20, 2010 1:28 pm

It looks like it is getting there but there are a couple of problems. When you view the pages source the link for the current page looks like this
Code: Select all
<td class="your_class"><a href="http://volcanodeluxe.com/store/page55.html" <img src="http://volcanodeluxe.com/store/media/<img src="http://volcanodeluxe.com/store/images/buttons/homeglow.png" alt="" /><img src="http://volcanodeluxe.com/store/images/buttons/homeglow.png" alt="" />
</td>



One problem is caused by error in the code I posted. In the [-- DEFINE LINK_TO_PAGE --] section is this line
Code: Select all
<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]" <img src="[-- OUTPUT_DIRECTORY_URL --]/media/[-- page.field1 --]" alt="[-- page.field1 --]"  >

there should be a closing angle bracket after the " and before the <img src= like this
Code: Select all
<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]" ><img src="[-- OUTPUT_DIRECTORY_URL --]/media/[-- page.field1 --]" alt="[-- page.field1 --]"  >

Also in the page source you see that the <img src= is duplicated and the first one is a mix of 2 img src lines.
Code: Select all
 <img src="http://volcanodeluxe.com/store/media/<img src="http://volcanodeluxe.com/store/images/buttons/homeglow.png" alt="" /><img src="http://volcanodeluxe.com/store/images/buttons/homeglow.png" alt="" />

Did you include the full html for displaying the image in page field1 or just the image name? If you included the entire html url then you should just use the tag [-- page.field1 --] instead of <img src="[-- OUTPUT_DIRECTORY_URL --]/media/[-- page.field1 --]
In my example I only included the image name "homeglow.png" not http://volcanodeluxe.com/store/images/b ... meglow.png"

I don't understand this statement
Code: Select all
the thing I have to figure out now, is how to make them active again. I was using this..

img.link_image {
border: 0px none;
}
img.link_image:active {
position:relative;
top:2px;
left:2px;
}
What do you mean by "make them active" The "glow" links are active but they just reload the same page so it may not seem like they do anything.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Next

Return to User Forum

Who is online

Users browsing this forum: No registered users and 165 guests

cron