Style request: Make 'x' only occur once

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

Moderator: Spunkmeyer

Style request: Make 'x' only occur once

Postby Andross » Fri Jul 01, 2005 1:12 am

I just want to have a simple piece of code that will let me insert a single line into a style and it will only appear once.

Example:
I have a large news list, Maginot Slice generated, and so it's using a certain template, but this template is also used by several other pages the Maginot Slice Profile generated. Thus, I can't create a template for what I want, and there are several different headings anyway that I could take care of with an <If>...<If: Else> string.

So I basically want:

HEADER1 appears once

Subject
Teaser
Link

Subject
Teaser
Link
---

As with a style, Header1 will appear above the subject each time, I need a Perl code or something in the style that says 'Header1 will only appear once in the page right before the first entry'
User avatar
Andross
 
Posts: 138
Joined: Wed Jun 30, 2004 7:22 pm

Re: Style request: Make 'x' only occur once

Postby Parahead » Fri Jul 01, 2005 1:50 pm

Andross wrote:As with a style, Header1 will appear above the subject each time, I need a Perl code or something in the style that says 'Header1 will only appear once in the page right before the first entry'

This (untested) code should work for a style used by a Maginot Sliced Profile:
Code: Select all
<PerlCode>
unless($TopHeader{"$ProfileName-$SliceValue"}) {
$TopHeader{"$ProfileName-$SliceValue"} = 1;
</PerlCode>
Place your header style code here!
</If>
The rest of the style goes here...
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

Postby Andross » Sat Jul 02, 2005 2:21 am

Seems to be working. Thanks! :)
User avatar
Andross
 
Posts: 138
Joined: Wed Jun 30, 2004 7:22 pm

Postby Parahead » Sun Jul 03, 2005 6:46 pm

Andross wrote:Seems to be working. Thanks! :)
Good, I'll include it in the documentation as an example...
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 5 guests

cron