rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Surreal14 on December 08, 2009, 06:39:51 PM

Title: Reference folder name for marquee
Post by: Surreal14 on December 08, 2009, 06:39:51 PM
I am helping a buddy build his site and was wondering if there was a way to reference a certain page name to display associated marquee (it's been a while since I coded)

Basically what I would like to do is:

on home page: marqueeA
on music page: marqueeB
on XX page: marqueex

etc.

Thanks for your help and love the software and templates (may start up my own server soon ;) )
Title: Re: Reference folder name for marquee
Post by: Surreal14 on December 08, 2009, 07:03:21 PM
A little info: I know that to do this I need to reference the marquee (as I already have done for ease of changing) to every marquee setting in the HTML, I then need that marquee to reference the current folder being viewed, this value will tell the marquee what to say. I just need to know what the reference command would be and then I think I'll be set ;)
Title: Re: Reference folder name for marquee
Post by: bacter on December 08, 2009, 08:52:44 PM
You can use macros to display the marquee dependign of the folder, or better, you can call a section aamarquee and then use diff templates int the folders you want to do it, placing there an alternate aamarquee.
Title: Re: Reference folder name for marquee
Post by: Surreal14 on December 10, 2009, 06:30:04 AM
hmm not sure how to do that, got an example? not asking you to do the work for me, just how it would work in this program as he's not really making the page in HTML format.
Title: Re: Reference folder name for marquee
Post by: bacter on December 10, 2009, 10:02:01 AM
Doing it with macros: place some code like this where you have now one marquee, just change the first parameter of the pos macro to the foldername you want to have a special marquee for.

Code: [Select]
{.if|{.=|%folder%|/.}{:<marquee>This is the home page</marquee>:}.}
{.if|{.pos|music|%folder%.}|{:<marquee>this is the music folder</marquee>:}.}
{.if|{.pos|xxx|%folder%.}|{:<div>here you place html for folder xxx and <marquee>his subfolders</marquee></div>:}.}
Title: Re: Reference folder name for marquee
Post by: rejetto on December 10, 2009, 02:23:09 PM
or something like

<marquee>
{.switch|%folder%|;|
  /|this is the message for the homepage|
  /music/|this is the message for the music folder|
.}
</marquee>