Content management help

3 replies
  • |
Hi I would like to ask for some advice about content management. As it stands Im creating new pages, all page.html format, and then having to update every page with the link pointing to the new page.

I did originally get around the problem by using a javascript and placing a reference to that on every page. I update the content.js file and then theres a link on every page. But I have since discovered that spiders dont crawl whats within javascripts. I want them to so they know Im updating the content/adding pages. While the visitors will easily be able to navigate the new pages, the spiders wont even know the new pages exist unless I place a new link on every page.

Please can you help me implement a simple solution.

#content #management
  • Profile picture of the author kokopelli
    You can convert your site to PHP and use (indexable) PHP includes - similar to what you're doing with a Javascript "include". Something like this:

    <?php include('includes/navigation.php'); ?>
    Then just add your navigation links to that one file.

    To accomplish this, you can either rename all your HTML pages to the .php extension (you do not have to do anything else to "turn them into PHP"), and 301 redirect the old pages to the new ones. Or, if using Apache, you can add something like this to the .htaccess file to get the HTML files parsed as PHP:

    AddType application/x-httpd-php .html .htm
    If that doesn't work, look here for alternatives: How To Parse HTML Files As PHP – Web Development Blog
    {{ DiscussionBoard.errors[5681905].message }}
    • Profile picture of the author Mat Lemin
      ok, thankyou for your response. It seems like a bit of work but if thats the way to do it then I will have to roll up my sleeves.

      Thanks for the answer, I guess its time to stop being ignorant to php, i just use .html because its easy, but i think im right to say that php wont involve learning too much, basically the same i hope.

      In fact, it looks like youve covered everthing there, good stuff.

      hmmm, i suppose the easiest way is first to find out if im using apache or not, I dont know. If I am then I guess then yes, same principal as the javascript im doing and should be easy.
      {{ DiscussionBoard.errors[5682355].message }}
      • Profile picture of the author Mat Lemin
        I renamed all the pages to .php

        Used the php include..

        Worked a treat, thanks very much. Been bugging me for ages.
        {{ DiscussionBoard.errors[5693984].message }}

Trending Topics