1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Page Numbers problem when updating with content

Discussion in 'General Programming Chat' started by MrLavs, Mar 27, 2014.

  1. MrLavs

    MrLavs Newbie

    Joined:
    Mar 22, 2014
    Messages:
    9
    Likes Received:
    0
    Occupation:
    Student
    Location:
    UK
    Hey BHW people

    I have got to the stage in my website where all the content is added and everything is finished apart from page numbers (i left worst till last). So each page contains 9 thumbnail images and i will be adding at least 2 to 3 new thumbnails a day and this is where the problem starts. i have named all html pages like <page1.html> then they all link to each other using a <a href </a>. The problem is when i add new content i will be editing page1.html remove the bottom two right thumbnail and then add 2 new new thumbnail in the top left so new content is added and old content is moved onto an older page. Then add the 2 old thumbnails of content to Page2.html and do the same as before. This is a terrible way of doing in since i am now up to 20 pages of content and it will take hours to do a simple update. There has to be a simple way of doing this unfortunately i just cannot think of one since this is my first time building a site of this kind.

    I am coding in notepad++ using html & a little bit of JavaScript. If anyone can help me or refer me to code i would be so thankful since this is slowly driving me to the point of insanity. Its gone 4am Thursday and i have been working on the site since 10am Wednesday, this was my last resort since i didn't want to make a post that probably has a very easy solution and that would waste people's time.

    This forum has always been a great source of help for myself so im feeling hopeful now that its posted.

    Cheers people

    Mr Lavs
     
  2. MrBlue

    MrBlue Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    950
    Likes Received:
    662
    Occupation:
    Web/Bot Developer
    It would be easier if your site was database driven. Your thumbnails would be loaded dynamically onto the page so that you wouldn't have to manually shuffle them around from page to page. Another option, which may be simpler at this point, is to store a list of the image file names in a JSON file. Then with some simple Javascript you could read in the file and display the thumbs onto the appropriate page.