SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    bellmore
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Embedding links for Simple Updates....Need Clarification

    Is there anyway to create a set of links as a style so if I add a product link in the future, the additional link updates on everypage? Maybe I am missing something here, but every element on my homepage can be altered sitewide through use of classes. I undertsand why the link code needs to be on the html page, but there must be an easier way to add or remove products without editing every page?

    Please help, I'm sure this is basic and I'm just missing it.

  2. #2
    \m/\m/ karinne's Avatar
    Join Date
    Dec 2002
    Location
    Aylmer, QC, Canada
    Posts
    409
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can use the include function in PHP or if your server supports it - look into Server Side Includes (SSI) (same as php includes)

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,821
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    Css only does the presentation .

    Content should be handled through the html.

    If you have items on your page such as headers footers and main navigation that you may wish to update then you can construct them using includes. Either php includes or Server side Includes, depending on your hosting options etc.

    Then you just maintain one navigation file that is automatically included on all your pages.

    e.g. in php:
    Code:
    <body> 
    	 <?php include("/includes/mainmenu.php"); ?>
    All you have to do then is change the mainmenu file and upload it and the whole site is changed in one go.

    If you have DWMX (or something similar) then you can use their template options so that you just update the main template and all pages are updated. However you still have to upload the whole site again.

    Hope that helps.

    Paul

    Edit:


    oops - Karinne beat me to it I must learn to type properly

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    bellmore
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We currently use coldfusion to run specific parts of our site, such as the "quote cart" system. Isn't it true that when using ASP, PHP, or CFM, you must change the document entirely and it's no longer an html file? I'm pretty sure it works that way. From what I am reading it sounds like using includes as you would an iframe. Though I do not think that is the case, it's more likely the document format would need to change to .cfm to use includes. Is there any other way of doing this?

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,821
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    If your using php includes then you usually have an extension of .php so that the php gets parsed by the server etc. Although you can set up your server to check html files for php but then it means all html files get checked which may have an impact on speed. However many sites use includes so I don't think its that big an issue. I'm afraid I don't have any knowledge of CFM so I can't say how they would work together but i'm sure its feasible.

    Includes just put the code in your page and then your page just gets sent like a normal html file. When you view source on the live page its just a normal page (not like iframes where content is loaded inside the inline frame).

    The only other way I can think of doing this is to use a template system such as that provided by DW, or a dw library function which is similar to includes (I believe).

    Paul


Bookmarks

Posting Permissions

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