Link Loop Issue

General ShopSite user discussion

Link Loop Issue

Postby ajhauser » Wed Dec 07, 2011 12:54 am

Ok, so this was working about 25 minutes ago, but I have since added a few pages - and it is painfully obvious that I am missing something. This used to list my pages in a line, seperated with a "|" pipe - but now it only lists one page and doesn't close the <a href> tag - so all of my text is one large link. I'm not sure what I goofed up. All I am trying to do is list the different pages of the site and have each be linked up. I added a div and removed the table elements for easier styling. ANy ideas? Most appreciated!

Code: Select all
[-- IF PAGE.NumLinks 0 --]
 [-- ELSE --]
      <div class="GeneratedProductList">
      Other pages and products you may wish to view:<br />
 [-- LOOP LINKS --]
 [-- LINK --] | 
 [-- END_LOOP LINKS --]
      </div><!-- GeneratedProductList -->
 [-- END_IF --]


The error can be seen here: http://brotherscountrysupply.com/store/index.html
Website Design, Website Development, eCommerce and Hosting
ajhauser
 
Posts: 84
Joined: Tue Dec 06, 2011 4:18 pm
Location: Earlville - the land of Earls

Re: Link Loop Issue

Postby Jim » Wed Dec 07, 2011 7:25 am

Well for starters the [-- LOOP LINKS --] is listing page links not products so you might want to chance the class name to GeneratedPageLinksList. So maybe the GeneratedProductList style is causing the issue.

How many pages do you have assigned to the page? Using this code if you only have one page assigned to the page being generated you would have the link to that page followed by a |. And if you have multiple pages assigned to the page you will have each page link followed by a |, including the last link. So if you had 3 pages assigned to the page you would see
Code: Select all
Page1 link | Page 2 link| Page 3 link |
I don't know if you want the | after the last link or not but if not then you would need to change the coding to not display the last |.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Link Loop Issue

Postby ajhauser » Wed Dec 07, 2011 10:56 pm

Ok, so it seems then that I am using the tag incorrectly - I was under the impression that the loop links tag was a run down of my pages... I didn't know I had to assign pages to it. Is that what you're saying?

I will go look for a way to do that now.
Website Design, Website Development, eCommerce and Hosting
ajhauser
 
Posts: 84
Joined: Tue Dec 06, 2011 4:18 pm
Location: Earlville - the land of Earls

Re: Link Loop Issue

Postby ajhauser » Wed Dec 07, 2011 11:05 pm

Ok yeah this seems to be working but the anchor tags are not closed - is this something I have to make repeat manually since I added the "|" separator?

Is there a way to make the "|" after the last link NOT show up?
Website Design, Website Development, eCommerce and Hosting
ajhauser
 
Posts: 84
Joined: Tue Dec 06, 2011 4:18 pm
Location: Earlville - the land of Earls

Re: Link Loop Issue

Postby ajhauser » Wed Dec 07, 2011 11:12 pm

Oh nevermind - I plugged in the recommended code. It seems that the anchor tag wasn't getting closed to begin with. It works because they are separated by a <tr> that closes... so the answer seems to be just closing the anchor </a> tag before my pipe "|" character...
Website Design, Website Development, eCommerce and Hosting
ajhauser
 
Posts: 84
Joined: Tue Dec 06, 2011 4:18 pm
Location: Earlville - the land of Earls


Return to User Forum

Who is online

Users browsing this forum: No registered users and 123 guests