Page 1 of 1

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

PostPosted: Sat Mar 28, 2015 4:40 pm
by mysticscooby
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?

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

PostPosted: Sat Mar 28, 2015 5:14 pm
by mysticscooby
is there a way that I can get the code for the plain template?

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

PostPosted: Mon Mar 30, 2015 9:38 am
by ShopSite Lauren
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 --]