BV Commerce Forum
»
BV Commerce Support
»
General Support
»
Using Include files for custom HTML blocks
Rank: Member
Joined: 12/30/2006(UTC) Posts: 65
|
Hi All,
I'm creating a set of graphics to serve as category links on the Homepage (just hardcoding these with the category links on the HP only).
So instead of adding the code into Default.aspx column 1 Div, I thought I'd put the code into an HTML block via the BV Dashboard. And it works fine.
But, I was wondering, if/how I can just place an Include statement into the HTML box, and have it reference an aspx file. So the HTML block won't contain tons of code but just something similar to: <!--#include file="HP_Sidenav.aspx" --> or Server.Execute("HP_Sidenav.aspx")
I have a vbscript background, but a rookie at .net. Can I pull this off without declaring namespaces or Registering the src ?
If I have to Register the source, can I add that into the HTML block, or must that line be at the top of the physical aspx page?
I tried this, but it didn't seem to work <%@ Register Src="HP_Sidenav.aspx" TagName="Header" TagPrefix="uc1" %> <uc1:Header ID="HP_Sidenav" runat="server" />
Thanks -Dave
|
|
|
|
Rank: Member
Joined: 9/27/2004(UTC) Posts: 1,099
|
Hello Dave. Open BVModules > ContentBlocks > Category Menu > view.ascx.vb After: Code: Dim m As New HyperLink m.ToolTip = c.MetaTitle m.Text = c.Name
Add: Code: m.ImageUrl = Page.ResolveUrl(Utilities.ImageHelper.GetValidImage(c.MenuOffImageUrl, True))
Make sure you have a category "menu" image defined in the admin. You will need to style it but it allows you to manage the images from the admin. |
|
|
|
|
Rank: Member
Joined: 9/27/2004(UTC) Posts: 1,099
|
This may need some more testing. I did not test it thoroughly. Nick Alberti attached the following image(s): Test.png (96kb) downloaded 63 time(s).You cannot view/download attachments. Try to login or register. |
|
|
|
|
Rank: Member
Joined: 12/30/2006(UTC) Posts: 65
|
Nick,
Thanks so much for the quick and detailed response!
I'm glad to see such a friendly and knowledgeable crew on this forum (I'll do my best to do my homework on things, and not bug the forum too much as I get my feet wet :>)
Thanks Again, -Dave
|
|
|
|
Rank: Member
Joined: 9/27/2004(UTC) Posts: 1,099
|
No problem. Let me know if you have any issues with it. |
|
|
|
|
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.