1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Large amount of html code - copying (FAR)

Discussion in 'HTML & Website Design' started by LuigiGucciano, Oct 22, 2016.

  1. #1
    Can anyone give me advice - I have a new menu (html) to copy in 331 html files. FAR function of Dreamweaver is limited. (There are 500 lines html) - does anyone know a program that can handle it? Or a solution for the limitations of Dreamwaever?
     
    LuigiGucciano, Oct 22, 2016 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Your base solution starts with losing Dreamweaver. Better, give it to someone you don't like. Best is to sell it to someone you really don't like.

    Now find a free, highly functional text editor. Search this forum for opinions on which editors are superior. Emacs is best, but may be more powerful than you'll ever need. The rest are pretty damned good themselves.

    This is an everyday practice among developers. You write a code snippet, say a menu, save it as a file and you propagate it throughout the site by using includes. In simple terms, on each page in which you want the menu, for instance, to appear, you simply write an include statement that inserts the snippet. Write the menu once, use it wherever needed.

    See http://httpd.apache.org/docs/current/howto/ssi.html for 'Server side includes' and
    http://php.net/manual/en/function.include.php for PHP include methods.

    If you use a templating engine, e.g. Smarty for PHP,
    see http://www.smarty.net/docs/en/language.function.include.tpl

    cheers,

    gary
     
    kk5st, Oct 22, 2016 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    What Gary said.

    Also... a menu with 500 lines of code? That is... quite a huge-ass menu. Normally, my site-wide menus are... I dunno, at most 20-30 lines of HTML. Given sub-menus, multiply that with 2 or 3 at the most. If your menu is more than 500 lines of code, it's either too complex, or doesn't load dynamically based on what side you're on.
     
    PoPSiCLe, Oct 22, 2016 IP
  4. wordplucker

    wordplucker Well-Known Member

    Messages:
    205
    Likes Received:
    38
    Best Answers:
    1
    Trophy Points:
    105
    #4
    php include, make that mess once, well, nonce would be better....
     
    wordplucker, Oct 22, 2016 IP