Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    OM2
    OM2 is offline
    New Coder
    Join Date
    Apr 2012
    Posts
    59
    Thanks
    7
    Thanked 0 Times in 0 Posts

    HTML preprocessors

    I am coding for jquerymobile
    I wanted a 'HTML preprocessor'
    I was told this is what I wanted

    What I want: to have footer and header files in one common file
    So, I'd maintain only these files and not have to update potentially 100's of individual HTML files

    I've googled and the ONLY results I find are 'ancient' Linux/Unix command programs that seem to be overly complex or not really user friendly

    Does anyone here have anything to recommend?

    Thanks


    OM

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,609
    Thanks
    6
    Thanked 997 Times in 970 Posts
    I suppose this has nothing to do with jQuery mobile specifically. Look into Server Side Includes or PHP’s include() function.

  • #3
    OM2
    OM2 is offline
    New Coder
    Join Date
    Apr 2012
    Posts
    59
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by VIPStephan View Post
    I suppose this has nothing to do with jQuery mobile specifically. Look into Server Side Includes or PHP’s include() function.
    thanks for the reply
    an include is exactly what i want - but for html
    there isn't an include functionality in the html5 spec
    any ideas?

  • #4
    Regular Coder dan-dan's Avatar
    Join Date
    Aug 2009
    Location
    England
    Posts
    483
    Thanks
    22
    Thanked 79 Times in 78 Posts
    You could use an iFrame. Personally, I'd go for the PHP include().

  • #5
    Regular Coder Donkey's Avatar
    Join Date
    Sep 2003
    Location
    Blackfield UK
    Posts
    312
    Thanks
    1
    Thanked 36 Times in 36 Posts
    you can include html using either of the two methods suggested.
    " 90% of everything is crud" - Theodore Sturgeon
    Filthy Beast - a 60's Rock Band

  • #6
    OM2
    OM2 is offline
    New Coder
    Join Date
    Apr 2012
    Posts
    59
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Donkey View Post
    you can include html using either of the two methods suggested.
    not if ur working with JUST pure html files?

  • #7
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,593
    Thanks
    0
    Thanked 645 Times in 635 Posts
    Quote Originally Posted by OM2 View Post
    not if ur working with JUST pure html files?
    All HTML pre-processors run on the server and deliver pure HTML to the browser. If you use a pre-processor then you are not working with pure HTMl files on the server but whether you do or don't you still get pure HTML files in the browser.

    The closest thing HTML itself has to an include is the <object> tag.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #8
    OM2
    OM2 is offline
    New Coder
    Join Date
    Apr 2012
    Posts
    59
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall View Post
    All HTML pre-processors run on the server and deliver pure HTML to the browser. If you use a pre-processor then you are not working with pure HTMl files on the server but whether you do or don't you still get pure HTML files in the browser.

    The closest thing HTML itself has to an include is the <object> tag.
    my plan was't on the server - it was on the pc
    i'm going to create something in perl to do what i want (i'll do a search to see if i can find something first though)

  • #9
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,593
    Thanks
    0
    Thanked 645 Times in 635 Posts
    Quote Originally Posted by OM2 View Post
    my plan was't on the server - it was on the pc
    i'm going to create something in perl to do what i want (i'll do a search to see if i can find something first though)
    perl is no different from the other alternatives - it too will need to run on the server in order to deliver HTML to the browser.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •