File name set by getMonth();

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Trenoweth
    New Member
    • Sep 2015
    • 2

    #1

    File name set by getMonth();

    I run a site that has a photo on the front page that changes each month, repeating after a year.

    Is there a way I can set the file name of the photo using getMonth(); so that the correct photo for each month is shown?

    E.g. every January photo0, every February photo1, every March photo2 and so on will show automatically without the need to edit the file.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    Is there a way I can set the file name of the photo using getMonth(); so that the correct photo for each month is shown?
    although I’d rather do that on the server side, you can do that in JS. set the image’s src attribute with the constructed URL.

    Comment

    • Trenoweth
      New Member
      • Sep 2015
      • 2

      #3
      Thanks for the response Dormilich. Have to say I hadn't thought of using SSI, I'll give that a try.

      Comment

      Working...