Adding the code to add my products and page links built on

Questions and answers about ShopSite Custom Templates

Adding the code to add my products and page links built on

Postby mysticscooby » Sat Mar 28, 2015 4:40 pm

Ok,
I think I am figuring this out but I have a question. I was able to figure out how to upload the template from my origanal site that is at lifesmysticaljourney.com. Now, question, if I use that template, how can I add the code so that when I add products and links on shopsite, they show up on the pages using this timeplate? Does that make sense?
mysticscooby
 
Posts: 15
Joined: Mon Apr 30, 2012 10:04 am

Re: Adding the code to add my products and page links built

Postby mysticscooby » Sat Mar 28, 2015 5:14 pm

is there a way that I can get the code for the plain template?
mysticscooby
 
Posts: 15
Joined: Mon Apr 30, 2012 10:04 am

Re: Adding the code to add my products and page links built

Postby ShopSite Lauren » Mon Mar 30, 2015 9:38 am

For page links: http://www.shopsite.com/templates/cookbook/page6-links.shtml
For product links: http://www.shopsite.com/templates/cookbook/page7-products.shtml


In your page template, below the [-- END_DEFINE PAGE --], add the following:
Code: Select all
[-- DEFINE LINK_TO_PAGE --]
    [-- IF PAGE.LinkGraphic --]
        <a href="[-- OUTPUT_DIRECTORY_URL --]/[-- Page.FileName --]">[-- PAGE.LinkGraphic --]</a><br>
        [-- IF PAGE.LinkName --]
        <a href="[-- OUTPUT_DIRECTORY_URL --]/[-- Page.FileName --]">[-- PAGE.LinkName --]</a>
        [-- END_IF --]
    [-- ELSE --]
        <a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]">[-- IF PAGE.LinkName --][-- PAGE.LinkName --][-- ELSE --][-- PAGE.Name --][-- END_IF --]</a>
    [-- END_IF --]
    [-- IF PAGE.LinkText --]<br>[-- PAGE.LinkText --][-- END_IF --]
[-- END_DEFINE LINK_TO_PAGE --]


Then within your page template, where you want the page links and product links to appear, add the following:
Code: Select all
<table>[-- LOOP LINKS 2 --]
<td class="sublink">[-- LINK --]</td>
[-- END_LOOP LINKS --]</table>

[-- IF PAGE.NumProducts "0" --]
[-- ELSE --]
   <div class="loop-products">
      [-- LOOP PRODUCTS --]<div class="product">[-- PRODUCT --]</div>[-- END_LOOP PRODUCTS --]
   </div>
[-- END_IF --]
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 887
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 29 guests

cron