Rank: Member
Joined: 1/10/2005(UTC) Posts: 714
Thanks: 14 times Was thanked: 1 time(s) in 1 post(s)
|
I am trying to get my small image url in <link id="ImageLink" rel="image_src" href="" /> in my header on my product page. So far I was successfuly in getting the Small Image URL in, but it adds the path to my style directory before it: Code: <link id="ctl00_ImageLink" rel="image_src" href="../BVModules/Themes/TekGearReduxII/images/Products/Autoclaves/Graham-Field-8375.jpg" />
It should look like this: Code: <link id="ctl00_ImageLink" rel="image_src" href="/Products/Autoclaves/Graham-Field-8375.jpg" />
This is from my BaseStorePage.vb Code: Public Property ImageLink() As String Get Dim m As HtmlControls.HtmlLink = Page.Header.FindControl("ImageLink") If m IsNot Nothing Then Return m.href Else Return String.Empty End If End Get Set(ByVal value As String) Dim m As HtmlControls.HtmlLink = Page.Header.FindControl("ImageLink") If m IsNot Nothing Then m.href = value End If End Set End Property
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Bryan,
I believe the problem is the automatic pathing that .NET does when there is a runat="server" on the <head> tag. What you will probably need to do is pass a fully qualified URL to the property rather than a relative or absolute one.
Just curious, what are you trying to achieve with <link> element? |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 1/10/2005(UTC) Posts: 714
Thanks: 14 times Was thanked: 1 time(s) in 1 post(s)
|
ya know... I've noticed a lot of retail websites starting to provide "social bookmarking" links on their product pages to be posted to sites like facebook.com and digg.com. Facebook uses information from the meta tags and link tags in the header so it knows what the product name, product description and product image. It pulls the info automatically so the person "bookmarking" the product doesnt have to re-type anything.
Its just another way to share products with people.
|
|
|
|
Rank: Member
Joined: 1/10/2005(UTC) Posts: 714
Thanks: 14 times Was thanked: 1 time(s) in 1 post(s)
|
Originally Posted by: "Aaron" Bryan,
I believe the problem is the automatic pathing that .NET does when there is a runat="server" on the <head> tag. What you will probably need to do is pass a fully qualified URL to the property rather than a relative or absolute one.
How do i pass that rather than an absolute or relative?
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Oh, cool! I always wondered how they did that but never bothered to look into it. I figured it was done with RSS. Thanks! |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Try this. You may have to mess with it a little bit, but you get the idea. Code: Public Property ImageLink() As String Get Dim m As HtmlControls.HtmlLink = Page.Header.FindControl("ImageLink") If m IsNot Nothing Then [b]Return WebAppSettings.SiteStandardRoot & m.href[/b] Else Return String.Empty End If End Get Set(ByVal value As String) Dim m As HtmlControls.HtmlLink = Page.Header.FindControl("ImageLink") If m IsNot Nothing Then m.href = value End If End Set End Property
|
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.