How to reference a Content scriptlet ?

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
SteelArt
Ensign (ENS)
Ensign (ENS)
Posts: 4
Joined: Wed May 18, 2011 3:41 pm

How to reference a Content scriptlet ?

Post by SteelArt » Wed May 18, 2011 4:23 pm

I am sure this is a dumb question but thought I would ask anyway.

I have added a content scriptlet to the website and now I wish to add a link to the navigation bar which opens it up. I have edited the standard navbar and made the link appear. What I can't figure out is what the address is ?

<td class="navigation" colspan="2">
<div class="content" style="float:left;">
<a href="~/Default.aspx" class="tab">Home</a>
<a href="~/Search.aspx" class="tab">Product Finder</a>
<a href="~/AdvancedSearch.aspx" class="tab">Advanced Search</a>
#if ($store.Currencies.Count > 1 )
<a href="~/Currencies.aspx" class="tab">Currencies</a>
#end
<a href="~/ContactUs.aspx" class="tab">Contact Us</a>
<a href="~/App_Data/Scriptlets/Custom/MyPage.htm" class="tab">Manxter 2+2 </a> ### The line I have added, tried a heap of variation but nothing seems to work ?
</div>
</td>

I searched the help files etc with no luck. It is not an issue to direct to an external website etc just can't figure out the href path for the scriptlet I have added.

plugables
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Sat Aug 15, 2009 4:04 am
Contact:

Re: How to reference a Content scriptlet ?

Post by plugables » Thu May 19, 2011 4:04 am

Scriptlets are not supposed to be accessed directly. Scriptlets are the building blocks of the page. You refer to the page that uses the scriptlet in question. Scriptlets are of 5 types. Layout, Header, Footer, Sidebar and Content. Each type of scriptlet is in its corresponding directory. A display page in AC, be it a product, category, webpage or other, is built based on the scriptlets assigned to it.

If you want to add a static html file just add it to your store home directory and access it directly. If you want to add a new page with dynamic content, create a new aspx page, similar to one of the existing pages in home directory. You can simply make a copy of Defalut.aspx and edit it to change the scriptlets assigned to it.

frankssports
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Thu Jun 16, 2011 10:21 am

Re: How to reference a Content scriptlet ?

Post by frankssports » Thu Jun 16, 2011 10:42 am

how do you assign a scriptlet to a new webpage?

i just created this webpage and created a new scriptlet for content but is not working https://www.frankssports.com/couponoffers

thanks

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: How to reference a Content scriptlet ?

Post by jmestep » Fri Jun 17, 2011 5:54 am

For most webpages, there are four files and they are put together like this, using the product page as a sample.
Product.aspx in the root of the site
Show Product 1.htm in the Scriplets/Default/Content folder- that has code in it like [[ConLib:BuyProductDialog]]
Two or more files in the ConLib folder- BuyProductDialog.ascx and BuyProductDialog.ascx.cs

So you would need to create those files. Normally I start out by copying existing files and editing them.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

frankssports
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Thu Jun 16, 2011 10:21 am

Re: How to reference a Content scriptlet ?

Post by frankssports » Mon Jun 20, 2011 12:02 pm

thanks :D

Post Reply