Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Setting color for active page in a forEach loop

Hello, I wonder if somebody have an idea how to set the text color for the active page in a forEach loop listing, typically the Headline texts. What I want is to have the selected page highlighted in a different color for the user to navigate more easily. I'm migrating a site to CityDesk so I am not yet familiar with all fancy things you can do.
Help much appreciated
/Peter

Peter Axelsson
Monday, April 05, 2004

http://discuss.fogcreek.com/CityDesk/default.asp?cmd=show&ixPost=10381&ixReplies=3

That may give you some ideas. This site does it (mostly) for the top menu
http://tk-jk.net/euphonic/blog/general/Euphonicshows.html

tk
Monday, April 05, 2004

You want to mark the page the user is looking at in a menu?

Paul Vanovertveld
Monday, April 05, 2004

I have all Pages, that I want to be displayed in the menu in blog/general
each of these pages uses a Template where the body tag is build

     <body id="{$.filename$}">
and the filenames are PhotoAlben, Archive, About, ...

The Menu is build with this script

    {$foreach x in (folder "blog/general") sortAscendBy .extra2 $}
          <li id="{$x.extra1$}">
            &nbsp;<a href="{$x.link$}">{$x.headline$}</a>
          </li>
          {$next$}
         
      extra2 ist just my personal sortorder (Numbers)
      extra1 is one, two, three, ....
     
     
The CSS Entry is now just

body#home .kopf li#one a,
body#PhotoAlben .kopf li#two a,
body#Archive .kopf li#three a,
body#About .kopf li#four a{
    font-weight: bold;
    text-decoration: underline;
    } 

Now the only thing I have to change is my CSS file.
You can look at it at http://www.vanovertveld.net

Paul Vanovertveld
Monday, April 05, 2004

Paul,

That's a really nice site.

Can I ask what software you are using for you photo gallery?

11 Month Lurker
Monday, April 05, 2004

Month,

Citydesk of course.
On my Notebook I use Photomeister (www.photomeister.com)
There is an export function where I can resize the pictures in a  single job. Copy all of them into a new folder  and integrate the folder into citydesk.

regards
Paul

Paul Vanovertveld
Tuesday, April 06, 2004

Thanks a lot for all the help. Have anyone seen this feature implemented in any of the templates that are available?
/Peter

Peter Axelsson
Tuesday, April 06, 2004

tk/Paul

Cool, thanks for posting this script. Any ideas on how to skip making the current page a link??  It's a moot point but being picky I'd like to highlight the current selection and remove the ability to select it.

PNII

Perpetual Newbie II
Wednesday, April 07, 2004

*  Recent Topics

*  Fog Creek Home