if it is possible to add ( put ) same code all my pages? ( Dreamweaver - HTML )

Discussion in 'HTML & Website Design' started by mexfi571, Oct 28, 2009.

  1. #1
    Yes friends,

    It is my question. I start change some parts of my site. I will add same photos, codes, ... all my pages but there are hundreds pages. It kills me to change each page. If it is possible , can you tell me? I use dreamweaver - html. If you have any idea about it, i hope that you'll help me. Thanks a lot a lot friends.
    Sincerely,
     
    mexfi571, Oct 28, 2009 IP
  2. adwebtiser

    adwebtiser Peon

    Messages:
    95
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    How about trying the search button in the forum? http: // forums.digitalpoint.com/showthread.php?t=1549407
     
    adwebtiser, Oct 28, 2009 IP
    Stomme poes likes this.
  3. CannonLogin

    CannonLogin Peon

    Messages:
    311
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do you mean you've changed the overall layout? If you did it with css, you only need to change the style sheet. If it's something code wise that you want to change over all pages I'd use the search and replace option in the dreamweaver code view. And be sure to select the folder that has all the html files in it.
     
    CannonLogin, Oct 28, 2009 IP
  4. mexfi571

    mexfi571 Peon

    Messages:
    125
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    For example, before i didn't have any favicon.ico, i want to add it all my pages but it is so so hard to add all pages same code of favicon.
    Thanks a lot
     
    Last edited: Oct 28, 2009
    mexfi571, Oct 28, 2009 IP
  5. knobish

    knobish Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You need to look into PHP/MySQL - you can use it to make your sites dynamic so when you make changes they go sitewide(if you set it up correctly). You may particularly look into the include() function as that may satisfy what you're looking for. I used to do pages without PHP includes as the header/footer and its just a huge mess.


    For the favicon - try putting your favicon in all the directories where its not showing, or consult your hosting company on how they handle the favicon.
     
    knobish, Oct 28, 2009 IP
  6. CannonLogin

    CannonLogin Peon

    Messages:
    311
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    That is not neccesary at all for what he needs to do.... He does not need to learn php or work with databases to get this done.

    Simply in code view of dreamweaver use the search and replace option. For example.

    I was going to write it out but I found it online.

    http://webdesign.about.com/od/dreamweaverhowtos/ht/dw_find_replace.htm
     
    CannonLogin, Oct 28, 2009 IP
  7. knobish

    knobish Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yeah i used to use search and replace.

    <?
    include("footer.php");
    ?>

    Not that difficult.

    Not that tough, not to mention, once you learn php and mysql, a whole new world of automation opens up, especially to guys running huge content sites like this guy sounds like hes doing.

    Do it the right way, youll thank yourself later.
     
    knobish, Oct 28, 2009 IP
  8. Fez

    Fez Member

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #8
    If you are using Dreamweaver I'd recommend using templates with editable regions that vary from page to page. So basically, when you need to update an element that is present on each page of the entire site you would just have to change your template and apply it to all of your existing pages. Google it up, using Dreamweaver templates is almost necessary for fairly large static websites that need updating once in a while.
     
    Fez, Oct 29, 2009 IP
  9. helphelp

    helphelp Peon

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You need to separate your common content like header, footer, navigation menus etc to different files and include them. So for any such change, you just have to change one or two files and it gets affected throughout your site. Otherwise u can use the dreamweaver templates and make the dynamic contents editable. So if you update the master template it automatically update all the pages (non-editable part) driven by this template. Hope this helps..
     
    helphelp, Oct 29, 2009 IP
  10. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #10
    Use search and replace in dreamweaver. If you stick to static pages, you may make a page template.
    But I recommend you switch to scripts written in php.
     
    myst_dg, Oct 30, 2009 IP
  11. mexfi571

    mexfi571 Peon

    Messages:
    125
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    thanks friends, all you helped me. I succeded.thanks a lot
     
    mexfi571, Oct 30, 2009 IP
  12. toycat

    toycat Well-Known Member

    Messages:
    2,304
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    150
    #12
    Heres a way i use
    Make a directory for every page name, eg domain.com/page
    then make an index.php page which is
    [header code]
    <?php
    Insert"content.htm";
    ?>
    [footer code]

    then upload that (and content.htm) to every directory, meaning you can change the design or just the text/photos on each page.
     
    toycat, Oct 30, 2009 IP
  13. knobish

    knobish Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    you mean
    <?php
    include("content.html");
    ?>



     
    knobish, Oct 30, 2009 IP
  14. toycat

    toycat Well-Known Member

    Messages:
    2,304
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    150
    #14
    Yeah, thats is

    I don't remember it off by heart, i just copy and paste from a file :D
     
    toycat, Oct 31, 2009 IP
  15. cignusweb

    cignusweb Peon

    Messages:
    147
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #15
    chat with online below link people they are sure help you

    cignusweb.com
     
    cignusweb, Oct 31, 2009 IP