SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Accessibility Issue

    Hi everyone,

    I'm currently working on a website for a friend, doing it in HTML/CSS, finished most of it actually, but i'm having this issue that i need to solve before moving on, the website is going to have new pages and going to be updated frequently.

    The thing is, there is one part in the header that is going to be updated with new text every now and then, and it should show on all pages, currently, i'll have to go thru each page and edit it. In the future when the number of pages become too big this will not be a logical way to do it if i want to change text.

    I would like to learn and know if there is a way to make this particular part accessible from like one place, and when i change it in this one place changes will reflect in all other pages which will only have a link or reference to that single place.

    I know it can be done in php, but i'm not a php expert and my website is already in html.

    Any help is appreciated.

    Thanks

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    If you are using a program like Dreamweaver you can create library items (or something like that) but they are not very good.

    I've written a simple post about how to do this with PHP. You really don't need any PHP skills to do this, and it can be done on HTML pages if you like. Have a read of this and see if it helps:

    http://www.pageaffairs.com/web/php/e...-php-includes/

  3. #3
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi ARayess, welcome to SitePoint!

    Here is another thread with some info too.

    Nice tutorial Ralph, I especially liked the "DOCUMENT_ROOT" tip, enabling the paths to be absolute!
    Happy ADD/ADHD with Asperger's

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Erik J View Post
    Nice tutorial Ralph...
    Many thanks Erik. That compliment is especially encouraging coming from you!

    Your link was useful too, as it led me to looking into the .shtml option, which I was not really familiar with.

  5. #5
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I came to the right spot, thanks alot Ralph and Erik, i'm following Ralph's tutorial on this.

    Cheers

  6. #6
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Just in case you were still interested, most server-side languages have some kind of includes system, I've added a few of the other language based commands you can insert to embed depending on which you choose to use, might be useful for other people reading the thread.

    • SHTML – <!--#include virtual="file.html"-->
    • PHP – <?php include('file.php'); ?>
    • ASP – <!--#include file="file.asp" -->
    • ColdFusion – <cfinclude template="file.cfn">
    • JSP – <jsp:include page="file.jsp" />


    PS: What do includes have to-do with accessibility?

  7. #7
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Nice list Alex. Thanks

    Quote Originally Posted by AlexDawson View Post
    PS: What do includes have to-do with accessibility?
    The OP said: "I would like to learn and know if there is a way to make this particular part accessible from like one place"

    "Accessibility" means something different in common parlance.


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
  •