Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How Would I Do This?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #196166
    Rhyss
    Participant

    I want to know if I can just write ‘display_header’ or something like that and it refers to a file I have created with the header code?

    If this is possible please let me know!

    #196170
    shaneisme
    Participant

    Sure, but it requires A) server-side code to do an include, or B) a static-site processor that sets up templates, etc.

    If you have access to a web server, most of the time you’re looking at PHP:

    https://css-tricks.com/snippets/php/php-include/

    There’s also require which works exactly the same as include, but if the file is not found it will cause an exception.

    If you’re running another type of server let me know (or if you have problems with this).

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.