Page Links - If Then?

General ShopSite user discussion

Page Links - If Then?

Postby Brandon Eley » Mon Jan 02, 2006 8:09 am

I've been working on a template and have just about everything in "if
then" statements in the ShopSite templates as to keep the code as clean
as possible.

With the page links, I tried the following:

[-- IF LINKS --]
<div id="links">
[-- LOOP LINKS {numcolumns} --]
[-- LINKS --]
[-- END_LOOP LINKS --]
</div>
[-- END_IF --]

But it didn't work. It worked for just about every other field I tried.
Anyone know of a way to get this to work w/ ShopSite templates?

--

Brandon Eley
*********************
EleyTech Web Development
207 N. Lewis Street, Suite E
LaGrange, Georgia 30240
*********************
brandon@eleytech.com
www.eleytech.com
Phone: (706) 883-7078
Mobile: (706) 668-0174
Toll-Free: 1-800-682-2550
Brandon Eley
 

Re: Page Links - If Then?

Postby loren_d_c » Mon Jan 02, 2006 9:48 am

the LINKS tag will not work in an IF tag. Try something like this:

[-- IF PAGE.NumLinks 0 --]
# do nothing
[-- ELSE --]
<div id="links">
[-- LOOP LINKS {numcolumns} --]
[-- LINKS --]
[-- END_LOOP LINKS --]
</div>
[-- END_IF --]

-Loren


Brandon Eley wrote:
I've been working on a template and have just about everything in "if
then" statements in the ShopSite templates as to keep the code as clean
as possible.

With the page links, I tried the following:

[-- IF LINKS --]
div id="links"
[-- LOOP LINKS {numcolumns} --]
[-- LINKS --]
[-- END_LOOP LINKS --]
/div
[-- END_IF --]

But it didn't work. It worked for just about every other field I tried.
Anyone know of a way to get this to work w/ ShopSite templates?
loren_d_c
 
Posts: 2569
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: Page Links - If Then?

Postby Brandon Eley » Mon Jan 02, 2006 10:35 am

Awesome... thanks Loren. That was exactly what I was looking for...

Loren wrote:
the LINKS tag will not work in an IF tag. Try something like this:

[-- IF PAGE.NumLinks 0 --]
# do nothing
[-- ELSE --]
div id="links"
[-- LOOP LINKS {numcolumns} --]
[-- LINKS --]
[-- END_LOOP LINKS --]
/div
[-- END_IF --]

-Loren


Brandon Eley wrote:

I've been working on a template and have just about everything in "if
then" statements in the ShopSite templates as to keep the code as
clean as possible.

With the page links, I tried the following:

[-- IF LINKS --]
div id="links"
[-- LOOP LINKS {numcolumns} --]
[-- LINKS --]
[-- END_LOOP LINKS --]
/div
[-- END_IF --]

But it didn't work. It worked for just about every other field I
tried. Anyone know of a way to get this to work w/ ShopSite templates?


--

Brandon Eley
*********************
EleyTech Web Development
207 N. Lewis Street, Suite E
LaGrange, Georgia 30240
*********************
brandon@eleytech.com
www.eleytech.com
Phone: (706) 883-7078
Mobile: (706) 668-0174
Toll-Free: 1-800-682-2550
Brandon Eley
 


Return to User Forum

Who is online

Users browsing this forum: No registered users and 170 guests