Loop Links

General ShopSite user discussion

Loop Links

Postby thefavoriteplace » Mon Feb 04, 2008 10:51 am

Hi: I am doing a custom template (code below) and have followed the code for the Page links on the side but for some reason it's just not working. I'd like it to automatically link to our other pages, but it just won't do it. Can you help?

Thanks,

Melissa

----


[--DEFINE LINK_TO_PAGE--]
<a href="[--OUTPUT_DIRECTORY_URL--]/[--Page.FileName--]">[--PAGE.LinkGraphic--]<b>
[-- IF PAGE.LinkName--]
[--PAGE.LinkName--]
[--ELSE--]
[--PAGE.Name--]
[--END_IF--]
</b></a>
[--END_DEFINE LINK_TO_PAGE--]


[--DEFINE PAGE--]
<html>
<head>
<title>[--PAGE.Name--]</title>
<meta name="keywords" content="[--PAGE.MetaKeywords--]">
<meta name="description" content="[--PAGE.MetaDescription--]">

</head>
<link href="http://thefavoriteplace.com/template.css" media="screen" rel="Stylesheet" type="text/css" />
</head>

<body>


[--VAR.TEXT2 PAGE.Text2 --]

[--IF PAGE.DisplayPageHeader--]
[--HEADER--]
[--END_IF--]


<!-- Begin Main Table -->

<!-- Begin Table of Links -->
<div id="subpage-nav">
<div id="inner">
testing text<br>
this is in the tepmlate<br>

[-- LOOP LINKS --]
[-- Link --]
[-- END_LOOP LINKS --]

<!-- End Table of Links -->
</div>
<div id="bot"></div>
</div>



<div id="subpage-content"></div>
[--IF PAGE.SearchProductField--]

[--SEARCH_FORM--]

<center>
<h1>[--PAGE.Name--]</h1>
</center>



<blockquote><b>Click on a product image to see more information about that product.</b></blockquote>


[--LOOP PRODUCTS--]

[--PRODUCT--]
<br>

[--END_LOOP PRODUCTS--]

<!-- End Table of Products -->






<div style="clear: both;"></div>

[--END_IF--]

[--IF PAGE.DisplayPageFooter--]
[--FOOTER--]
[--END_IF--]
[--END_DEFINE PAGE--]
thefavoriteplace
 
Posts: 3
Joined: Mon Feb 04, 2008 10:47 am

RE: Loop Links

Postby ShopSite Lauren » Tue Feb 05, 2008 11:10 am

Melissa,

When you say it won't work, what do you mean? are the links not showing up at all? are the links not linking to the correct place?

One thing that I would change is instead of the including [-- OUTPUT_DIRECTORY_URL --] I would just enter: <a href="[-- PAGE.FileName --]">

Also, on your loop links, the way that you have them setup now the links will appear in a linear format. If you would like the links to appear in a column, you would need to setup the loop links tags similar to the following:

<table cellpadding="0" cellspacing="0" border="0" width="100%">
[-- LOOP LINKS 1 --]
<td>[-- LINK --]</td>
[-- END_LOOP LINKS --]
</table>

The number "1" in the Loop Links tag makes it so that ShopSite creates a new row for every link. If you would like more than 1 column you can change that number. Also, I would suggest including the template name in the [-- LINK --] tag. For example, if you template is called "customtemplate" then your LINK tag would look like [-- LINK customtemplate --].

-Lauren
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Postby thefavoriteplace » Wed Feb 06, 2008 10:53 pm

Hi - thanks for answering.

The links aren't showing up at all. I'm sure that other pages in this template have defined link text, yeah.

I just put a <br> after the LINK tag because the design is css-based and table-less and I wanted to stick to that.

But other than that, no, NOTHING's working on the links. Ack. HELP!

Thanks for your help so far. :) I can show you the site but you have to change your hosts file to see it, as the DNS isn't pointed correctly right now.
thefavoriteplace
 
Posts: 3
Joined: Mon Feb 04, 2008 10:47 am

RE: Loop Links

Postby ShopSite Lauren » Wed Feb 06, 2008 11:10 pm

Melissa,

I definitely would add the template name into the LINK tag. For example if the template name is CustomTemplate the link tag would look like [-- LINK CustomTemplate --]. Once you have done that regenerate your website. If you don't mind providing a link to the page you are editing I can more easily see how the code is being setup.

Also double check that you have the page links assigned (Pages > Assign Items > Page > Proceed). When I copy the template code you included in your first comment and paste that into a demo store, it does display all the page links correctly.

-Lauren
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT


Return to User Forum

Who is online

Users browsing this forum: No registered users and 67 guests