Blog post page images not showing

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
1/9/2010 9:15:16 PM
Gravatar
Total Posts 12

Blog post page images not showing

I've created a custom skin, very loosely based on jsavard-mojoportal. I didn't notice it before, but when looking at a blog post (individual post, not a list), my header images are not showing.

See http://business.troy.edu/Portal vs http://business.troy.edu/Portal/its-everybodys-business.aspx

In the properties of the image in IE, I can see that it points to the incorrect URL (it's leaving off the /Portal/ part of the URL), but I don't know how to fix it.

Thanks for any help.

1/11/2010 10:32:54 AM
Gravatar
Total Posts 2187

Re: Blog post page images not showing

There are a couple ways to use images located in your skin directory from the layout.master. mojoPortal has a user control for this but you could just use regular mark-up.

The mojoPortal user control is:

<portal:SkinFolderImage ID="imgs1" runat="server" ImageFileName="YourPhoto.jpg" CssClass="YourClass" AlternateText=" " />

Regular mark-up is:

<img class="YourClass" src="YourPhoto.jpg" runat="server" alt=" " />

The key here is to use runat="server" and not to use the full path of the image. The full path will be determined by the server at run-time.

HTH,
Joe D.

1/11/2010 10:45:18 AM
Gravatar
Total Posts 18439

Re: Blog post page images not showing

It looks like you created a custom heading with an <asp:Hyperlink

Did you specify the ImageUrl like this:

ImageUrl="Data/Sites/1/skins/SCOB/TROY_Logo.jpg"

if so, try it like this:

ImageUrl="~/Data/Sites/1/skins/SCOB/TROY_Logo.jpg"

Note also, if you are planning to move this to the root http://business.troy.edu/ later, you will be making things difficult for yourself by developing content in a sub folder like /Portal because the urls will be incorrect later when you move it to the root. It would be far easier if you used a different host name like http://dev.business.troy.edu instead of a folder.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.