The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 12 of 12

Thread: many similar pages, css or template ?

  1. #1
    609
    posts
    Registered User

    many similar pages, css or template ?

    i am building a site with many categories and the navigation/main section will stay the same but I don't want to edit each and every page when I add a new button to the section. Do you recommend CSS or should I just create a template in dreamweaver 2004 ?

  2. #2
    You'll certainly want to use CSS, but that wont help you with the navigation because they still need HTML on each page.

    Do you have php on your server/can you install it?

  3. #3
    609
    posts
    Registered User
    yes i have php why ? i'm not that good at php or any programming for that matter

  4. #4
    4,029
    posts
    home cooking is killing the restaurant industry
    well.. to include another file in a PHP file, you can just do this:

    PHP Code:
    <?php include ("nav.php"); ?>
    That would include the file nav.php in the file, and whenever nav.php was changed the content would change as well

    You could also use SSI (server side includes), but PHP is perfect for that kind of task.
    There are only 10 kinds of people in this world:
    Those that might know ternary, those that do, and those that don't
    Say NO to DRM.

  5. #5
    I'd do it in a DW template with CSS (no php). I wouldnt use PHP because, A) you dont know it that well. Though I would suggest learning it, I dont know if this is the best place to (include alone might not cut it depeding on file placement and references). And B) because in a template, you arent going to be able to visually see your php when editing in design view which isnt going to help you any when developing page content (in design view).

    Templates allow you to have a consistent design which can be edited easily accross all pages without the use of server-side inclusions. You can even set properties in a template to style your menu, such as specifying a item you want highlighted for a page or leave out peices you dont want present.

  6. #6
    Quote Originally Posted by λ
    well.. to include another file in a PHP file, you can just do this:

    PHP Code:
    <?php include ("nav.php"); ?>
    That would include the file nav.php in the file, and whenever nav.php was changed the content would change as well

    You could also use SSI (server side includes), but PHP is perfect for that kind of task as well
    I concur.
    Member #2 of the "I wont critique Timmytot's designs anymore" club.

  7. #7
    I know on a windows server you could just include the html in a .inc file or even a .asp file. No need to learn the language just include the snippet of html. Is this not the case in PHP as well?

    I actually use templates, nested templates, includes and css.....poor mans cms...lol

    shane-c....Your site is a lot like a transvestite in that respect.
    fester8542.I'd hit it like the fist of an angry God .
    JoshuaJonah.I design for DDD. Then clients usually like it, and the ladies find me more attractive.
    Cybercode Albert Einstein Said that my math teacher has that on his wall

    K-Emmys-06: Best "Best Mod" K-Emmys-06: Best "Most Creative Critic"

    Member #1 of the "I wont critique Timmytot's designs anymore" club

  8. #8
    176
    posts
    Registered User
    php include is the way to go

    ... and DW MX2004 shows you the included file (php,asp) in design view (previes)
    PHP Code:
    <zip> echo this; </zip

  9. #9
    You can Use SSI. It's exactly thesame as HTML, but you save the files with *.shtml extension. Then you can do the header/menu in one file, the content in another file and the footer in another file. So all you do is include the header and footer files in content file.

    Good thing is with SSI, you are not learning anything new. You just include the files like this for example:

    <!--#include virtual="header.shtml" -->

  10. #10
    Quote Originally Posted by senocular
    I'd do it in a DW template with CSS (no php). I wouldnt use PHP because, A) you dont know it that well. Though I would suggest learning it, I dont know if this is the best place to (include alone might not cut it depeding on file placement and references). And B) because in a template, you arent going to be able to visually see your php when editing in design view which isnt going to help you any when developing page content (in design view).

    Templates allow you to have a consistent design which can be edited easily accross all pages without the use of server-side inclusions. You can even set properties in a template to style your menu, such as specifying a item you want highlighted for a page or leave out peices you dont want present.
    Best advice here. Senocular knows his ****.

  11. #11
    DW also has library items which act like includes. But, unlike simple includes, DW will automatically update references when they change. You're also not dealing with the additional stress on the server from parsing a web document before serving it. Though, really, Im sure that wouldnt be an issue with you.

    I will say the one advantage of includes would be that if the include is edited, only the include would need to be re-uploaded to the site rather than all affected pages which would be the case with DW templates.

  12. #12
    609
    posts
    Registered User
    thx i used dw templates but i'm getting some weird things going on. I started a new thread on this issue if someone can please help me i would appreciate it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012