Syntax for Inline URL in Product page.

12 年 前
How does one call a url from within a product page paragraph?

<p>....Some text <a href="Page_To_Get.aspx">line items</a> and more text.....</P>

Always get not found. Url prefix shown in the browser is "Product" and the "Page_To_Get.aspx"

"Page_To_Get.aspx" is not a product page and the url is located in the root folder.

Tried "Resolveurl" also. No luck.

No problem linking to other product pages from within the product page or to the "Page_To_Get.aspx" from the home page.

12 年 前

If you just create a link to "PageToGet.aspx" from a product page, it will look for

Of course the "products" directory doesn't exist as this is just a virtual url generated for product pages.

So the best thing to is use an absolute url e.g. /pagetoget.aspx or better yet within the editor control.

Your links will then resolve successfully.

Hope this helps,

12 年 前
Had tried your suggestion before posting the question.

No luck using

a) <p>...text <a href="http://localhost:xxxxx/NopCommerceWeb/PageToGet.aspx">Detail</a> continued paragraph text...</p>

b) <p>...text <a href="">Text</a> continued paragraph text...</p>

c) <p>...text <a href="/PageToGet.aspx">Text</a> continued paragraph text...</p>

This works from Infoblock.aspx

d) <li><a href="<%=Page.ResolveUrl("~/PageToGet.aspx")%>">

At the moment I'm using the temp url at new hosted site using Win2008 & SQL server 2008 (same domain name) and trying this from the temp url and LocalHost using Vista Ultimate & VS2008 - SQL2005.

When done setting up site using nopCommerce I'll chg the DNS to new host.

In addition to copying the PageToGet.aspx to the temp url I also copied the PageToGet.aspx to currently hosted site. No luck with accessing file when running site from either local host or temp site.

If you could confirm that c) should work as shown, we'll leave this for now until we go live at the newly hosted site.

Thought it was bad idea to use b) when using SSL.

Thanks for looking at this.
12 年 前
Yes you are right, b) not so good when using SSL.

Yes c) should work if nopCommerce is installed at root of your site. If you are running as a virtual directory underneath the default localhost site, you may need to put in /NopCommerceWeb/PageToGet.aspx

Hope this helps,

12 年 前
Tried both (Local and Tmp site). No luck. Get page not found with the proper url prefix shown in both cases in the status bar.

We'll leave it for now and report back once we've gone live if this problem persists.

Thanks for looking at it.