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.

Need help about my HTML site

Discussion in 'HTML & Website Design' started by Soner, Jan 19, 2008.

  1. #1
    I use dreamweaver for my html site. But I got a problem. When I want to change a link or something like that, I should open every single page and edit them. Is there a quick way like editing only in one page and the other will be edited automatically ?
    SEMrush
    Thanks
     
    Soner, Jan 19, 2008 IP
    SEMrush
  2. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #2
    Open your HTML in DreamWeaver code view, and find the code for your menu or links.

    Highlight this code and press Ctrl+X, then in Dreamweaver, Press Ctrl+N and choose "PHP File".
    When it opens, select it all and press delete. Then past this:
    
    <?
    //Menu HTML code
    ?>
    
    PHP:
    .

    Save that file as menu.php

    Go back to your original HTML file(s) and replace every instance of your menu code with:
    
    <? include('menu.php'); ?>
    
    PHP:
    Then save those files with the .php extension. Then when you upload them to a webserver, all you have to do it edit menu.php and it will change on all the files.

    Cheers,

    BP
     
    blueparukia, Jan 19, 2008 IP
    Soner likes this.
  3. Soner

    Soner Active Member

    Messages:
    479
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #3
    thanks man, I will try that :)
     
    Soner, Jan 19, 2008 IP
  4. getwiththeprogram

    getwiththeprogram Peon

    Messages:
    120
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The advice above is the best way and way I prefer to do it but if its only rare changes and changing the extensions to php and setting up redirects will take time. You can use the find and replace option in dreamweaver under the edit menu so it will update all pages of your local site etc.
     
    getwiththeprogram, Jan 19, 2008 IP
    Soner likes this.
  5. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    105
    #5
    I would suggest as parukia said except use the correct delimiters which are 100% guaranteed to work ( <?php ) if short tags aren't enabled.
     
    soulscratch, Jan 19, 2008 IP
    Soner likes this.
  6. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,681
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You would need to first of all check that your web server supports PHP and that you arent already using another programming language on any of your pages

    That said, all programming languages have an equally simple equivalent plus others give you other options such as .Nets .Master files
     
    AstarothSolutions, Jan 20, 2008 IP
  7. Soner

    Soner Active Member

    Messages:
    479
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #7
    My site is HTML based with javascript apps. I dont use PHP at all, does it matter ?
     
    Soner, Jan 20, 2008 IP
  8. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #8
    there are many editors which can replace the code in all pages based on a particular text.

    You can use them to replace text from all files,only condition that text shd be unique

    Regards

    Alex
     
    kmap, Jan 20, 2008 IP
  9. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #9
    It will make no difference. Just keep in mind it won't work on your local computer - you will need to upload it to a host or install apache and PHP.
     
    blueparukia, Jan 20, 2008 IP
  10. samartha_561

    samartha_561 Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    hi are u hosting this html page if yes then u got 2 hav some sort of server(apache) loaded or must be hosting then u can use php suggestion, else go for changing everylink.
     
    samartha_561, Jan 20, 2008 IP