ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How do I reorder file uploads?

August 25, 2010 2:53am

Subscribe [2]
  • #1 / Aug 25, 2010 2:53am

    MarqueDigital

    33 posts

    Hello.

    I have a custom field of type = File.
    The Field Name is project_image

    When publishing an article I use this custom field to upload and add multiple images to an article.

    In an XML template I display the articles, and the images within each article as follows.

    {exp:weblog:entries weblog="work" order_by="entry_id" sort="asc"}
        
            <images>
                {project_image}
                    <image src="{file_url}" >
                {/project_image}
            </images>
        </project>
    {/exp:weblog:entries}

    This all works well.

    But I am at a complete loss as to how I would change the order that the project_images display. Could someone please point me in the direction of a technique that would allow me modify the order of the display of the uploaded files?

  • #2 / Aug 25, 2010 7:12am

    Sue Crocker

    26054 posts

    How are they showing now? In the date of the file upload?

  • #3 / Aug 25, 2010 12:09pm

    MarqueDigital

    33 posts

    Yes, it’s working as expected. Sample output as follows.

    
        <images>
                <image src="http://tt:8888/images/uploads/01a.jpg" >
            
                <image src="http://tt:8888/images/uploads/01b.jpg" >
            
                <image src="http://tt:8888/images/uploads/01c.jpg" >
            
                <image src="http://tt:8888/images/uploads/01d.jpg" >
            
        </images>
    </project>

    But I would now like to apply an arbitrary ordering to those image files.

  • #4 / Aug 25, 2010 12:31pm

    Sue Crocker

    26054 posts

    You might be able to use Matrix to order things exactly the way you want. Look for it over on [url=http://pixelandtonic.com”>Pixel and Tonic[/url You could also ask the author.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases