Page 1 of 1

How to reference a Content scriptlet ?

Posted: Wed May 18, 2011 4:23 pm
by SteelArt
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.

Re: How to reference a Content scriptlet ?

Posted: Thu May 19, 2011 4:04 am
by plugables
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.

Re: How to reference a Content scriptlet ?

Posted: Thu Jun 16, 2011 10:42 am
by frankssports
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

Re: How to reference a Content scriptlet ?

Posted: Fri Jun 17, 2011 5:54 am
by jmestep
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.

Re: How to reference a Content scriptlet ?

Posted: Mon Jun 20, 2011 12:02 pm
by frankssports
thanks :D