FANDOM


  • Hey Riyu. Since you brought up the possibility of automating the switches of birthday stuff on the main page and I'd already stumbled across much of the trick, I'll share what I found.

    To cause the contents of one page to show up in another page, you can use {{:pagename}}. It's also possible to use the date functions with the name, so doing {{:{{CURRENTDAYJST}}}} would right now use the contents of the page 25, if it existed. So it shouldn't be terribly complicated to make a few variants that tell it to check pages named for today, tomorrow, on through a week or whatever.

    Here's an example of a set of created daily pages. Since I haven't tried finding others I don't know if Template is the obvious best place to stick such pages or what, but it shouldn't make much difference. Namingwise the main thing I'd recommend is keeping Birthday in there in case someone wants to do something else date-based in the future. Template: Birthday April 6, Template: Birthday 04 06, that kind of difference shouldn't really matter. Creating all these pages would be a decently big task, but since it would take a year to cycle through them it's not like there'd be any rush.

    I also looked up a way to check if a page even exists--it might look pretty silly if it says "Happy Birthday!" when nobody matches on a given day. That seems pretty straightforward, too.

    {{#ifexist: S/mileage | S/mileage exists! | S/mileage doesn't exist. }}
    {{#ifexist: S/melly | S/melly exists! | S/melly doesn't exist. }}

    results in

    S/mileage exists!
    S/melly doesn't exist.

      Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.