Blog / News snippet on home page advice

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/14/2008 2:34:10 AM
Gravatar
Total Posts 48

Blog / News snippet on home page advice

Hi Joe,

I'm looking for some adive...

As there is no dedicated "News" feature I'm going to use a blog with the comments turned off. As with most sites i'll have a dedicated "News" page. What i'd like to do is have a snippet of this news displayed on the home page which links to the full article on the news page. The snippet would be the  4 most recent article titles.

I was planning on writing a quick feature that would grab the rss fead of the blog on the news page, and display the top 4 titles on the home page. What i'd also like to do is to specify an image when adding a blog entry that would be used on the home page with the title, like a "snippet image" or something.

What do you think would be the best way to do this... the rss bit is easy... it's really the image bit i'm not too sure on.

Thanks in advance for any help,

Reiss

3/14/2008 1:29:05 PM
Gravatar
Total Posts 18439

Re: Blog / News snippet on home page advice

mojoPortal already has an RSS Agregator feature. Put it on the home page and add the feed url for your blog to it. You can configure various things about the way the RSS Aggregator displays, including how many items to show.

If I wanted to add a little icon next to the title I would look at the rendered markup and figure out how to contruct a css selector for the titles in the rss feed and then use a background image with positioning. For an example see the tachmania skin as it puts an image into module titles using this technique.

My guess after looking at the markup myself is syntax something like this would work:

div.rsstitle h2 {background: url(square_arrow.gif) no-repeat 0% .7em;}
div.rsstitle h2 {background: url(square_arrow.gif) no-repeat ;
background-position:left; }

where square_arrow.gif can be any image, the path is relative to the css file so easiest if its in the same folder.

Hope it helps,

Joe

3/14/2008 1:45:54 PM
Gravatar
Total Posts 48

Re: Blog / News snippet on home page advice

Hi Joe,

Thanks again for the help.

Sorry i don't think i explained myself very well (had been up all night lol). When i said an image i ment a picture that was relevant to that article e.g.

Title: Mojo escapes!

Article: Mojo escaped today bla bla bla bla...

Snippet Image: mojo-with-big-tongue.jpg

The snippet image wouldn't necessarily be shown in the article on the news page, just on the home page. Would be good to be able to resize this image as verious projects would require different snippet formats. Does that make things a bit clearer?

 

I'll definitely look into the RSS Agregator feature, as that would save some time!

Thanks,

Reiss

3/14/2008 1:51:25 PM
Gravatar
Total Posts 18439

Re: Blog / News snippet on home page advice

I don't know a way to make a per post image that appears in the rss aggregator if it doesn't appear in the blog post so I would have to say the current feature set doesn't support this particular thing you are trying to do out of the box and you would have to implement something custom to achieve it.

Hope it helps,

Joe

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