Idea I have for my sites headlines, is this possible?

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

Idea I have for my sites headlines, is this possible?

Postby BJv » Sun Jul 10, 2005 8:42 pm

I'm new here someone told me about this script the other day. I was wondering if it was possible to do something like this using coranto :

the idea is to give the latest news headline an icon and a short description with a "read more" link to the article, then I wanted to add the second latest headline and so on without a description

see this image of how I want it to be below :

Image
BJv
 
Posts: 26
Joined: Fri Jan 26, 2007 4:52 pm

Postby bozoka45 » Sun Jul 10, 2005 10:44 pm

Do a search on the Forum for "Maginot Headlines" to do the "read more" part. Once you get that far, post again and I'll help you with making only the description for the first headline show.
User avatar
bozoka45
 
Posts: 1159
Joined: Sun Mar 23, 2003 8:38 pm
Location: New Orleans

Postby BJv » Mon Jul 11, 2005 2:58 pm

Thanks for the reply. Wouldn't a read more link just be something like this in the headlines template :

Code: Select all
<a href="http://your.site.com/path/to/viewnews.cgi?id=<Field: newsid>">read more</a>


The way I see it I need to do these things :

- add a description field and an icon url field to the submit news page.

- create 2 different headline templates one for the first headline and one for the rest

- then I have to figure out a way to show the first headline with template 1 and the rest of the headlines with template 2 (and this is where I get stuck :?)

Can it work this way or am I way off?
BJv
 
Posts: 26
Joined: Fri Jan 26, 2007 4:52 pm

Postby bozoka45 » Mon Jul 11, 2005 5:01 pm

Well, that would work fine if you want to use the viewnews.cgi method. If you want to create html files for each news item (ie: newsid.html), then you'll need to use maginot.

You don't want to use headline "templates". You want to use headline "styles". There's a distinct difference. A template is what wraps around the style to create a full HTML page, the sytle creates just the news item (in this instance, your headlines).

You'll only need one style.

Within your style, put this:

Code: Select all
<PerlCode>
unless $ShowOnce{$ProfileName} {
$ShowOnce{$ProfileName} = 1;
</PerlCode>
<Field: Description> //Or whatever else you want to only do for the first newsitem.
<PerlCode>
}
</PerlCode>
User avatar
bozoka45
 
Posts: 1159
Joined: Sun Mar 23, 2003 8:38 pm
Location: New Orleans

Postby BJv » Mon Jul 11, 2005 9:18 pm

Thanks to your help and a couple of searches on the forum I came up with this :

http://www.anotha.com/news/headlines.shtml

8)
BJv
 
Posts: 26
Joined: Fri Jan 26, 2007 4:52 pm

Postby Parahead » Tue Jul 12, 2005 6:12 am

bozoka45 wrote:Well, that would work fine if you want to use the viewnews.cgi method. If you want to create html files for each news item (ie: newsid.html), then you'll need to use maginot.
The choice between the two solutions would be a matter of space available, cpu and number of simultanious visitors...

bozoka45 wrote:You don't want to use headline "templates". You want to use headline "styles". There's a distinct difference. A template is what wraps around the style to create a full HTML page, the sytle creates just the news item (in this instance, your headlines).

You'll only need one style.

Within your style, put this:

Code: Select all
<PerlCode>
unless $ShowOnce{$ProfileName} {
$ShowOnce{$ProfileName} = 1;
</PerlCode>
<Field: Description> //Or whatever else you want to only do for the first newsitem.
<PerlCode>
}
</PerlCode>
...or you can create two profiles using two different styles, the first profile including only one newsitem and the other including as many as you want, but having the Skip Items set to 1.
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden


Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron