Reordering pix with links more easily

Discussion in 'HTML & Website Design' started by lektrikpuke, Oct 15, 2007.

  1. #1
    Hi y'all,

    I need some suggestions as to what I can do.

    I have a website that has 10 pix per page with accompanying links and descriptions. There are 4 pages of the 10 pix per page, so approximately 40 pix in total (for the time being). Originally, all the pix were put in chronological order. Now, however, the reverse is wanted. Easy enough the first time. But when a new pic is added to the first page, one pic has to be pushed off that page to the next page, which forces a pic off that page to the next, etc.

    Is there any easier way to do this (beside hand coding)? I'm trying to avoid using a database and php calls, but can't think of another way.

    Thanks. :D
     
    lektrikpuke, Oct 15, 2007 IP
  2. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Nope, this kind of functionality has to be built-in server-side. A database shouldn't be needed, unless the site becomes rather large.
     
    Dan Schulz, Oct 15, 2007 IP
  3. lektrikpuke

    lektrikpuke Well-Known Member

    Messages:
    297
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    113
    #3
    Dan,

    Thanks for the reply. Any suggestions, links, hints as how to do it?
     
    lektrikpuke, Oct 15, 2007 IP
  4. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #4
    A database is overkill in technical terms but given most hosting now comes with MySQL/ MS SQL/ Access capabilities and it is generally as easy or even easier to set up the db and its scripts then this is probably as good an option as an XML or text file which would be the more "appropriate" way of doing it.

    To edit you would simply insert the new line at the top of the XML file. A very basic example of this in .Net would be:

    .aspx code:
    
            <asp:GridView ID="GridView1" runat="server" DataSourceID="XMLds" AutoGenerateColumns="False" AllowPaging="True">
                <Columns>
                    <asp:ImageField DataImageUrlField="picture" />
                    <asp:HyperLinkField DataNavigateUrlFields="link" DataTextField="description" />
                </Columns>
            </asp:GridView>
            <asp:XmlDataSource ID="XMLds" runat="server" DataFile="~/XMLFile.xml" XPath="images/image" /> 
    
    Code (.Net):
    XML file:
    
    <?xml version="1.0" encoding="utf-8" ?>
    <images>
      <image picture="pic1.jpg" description="This is pic one" link="page1.html" />
      <image picture="pic2.jpg" description="This is pic two" link="page2.html" />
    </images>
    
    Code (XML):
     
    AstarothSolutions, Oct 16, 2007 IP
  5. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Unfortunately I don't. My specialty is on the front-end (and making sites accessible and easy to use without having them suck), not the back-end. Sorry. :(
     
    Dan Schulz, Oct 16, 2007 IP