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.

Problem displaying Gallery entry date & url.

September 24, 2012 3:46pm

Subscribe [1]
  • #1 / Sep 24, 2012 3:46pm

    Linda A

    666 posts

    I am trying to create an export template for Gallery data. The tags below work except for date and image url, and I am not sure why that is?

    {exp:gallery:entries gallery="gallery8" orderby="entry_date" limit="100"}
    {entries}
    
    
    Date: {entry_date format="%Y %m %d"}
    
    
    Title: {title}
    
    
    URL: {image_url}
    
    
    Caption: {caption}
    
    
    Copyright: Copyright © {custom_field_one}
    
    
    Category: {category}
    
    
    {/entries}
    {/exp:gallery:entries}
  • #2 / Sep 25, 2012 3:33pm

    Dan Decker

    7338 posts

    Hi Linda A,

    I think the issue is with the {entries} variable pair. I don’t believe you need that here:

    {exp:gallery:entries gallery="gallery8" orderby="entry_date" limit="100"}
    Date: {entry_date format="%Y %m %d"}
    
    
    Title: {title}
    
    
    URL: {image_url}
    
    
    Caption: {caption}
    
    
    Copyright: Copyright © {custom_field_one}
    
    
    Category: {category}
    {/exp:gallery:entries}

    If I might make a suggestion? You might structure this as a CSV output in another template. I hear you might be making the move to ExpressionEngine 2 and all the hip import scripts like a good CSV file 😉

    Cheers,

  • #3 / Sep 25, 2012 3:37pm

    Linda A

    666 posts

    The idea is definitely to make it into a CSV file, but first I wanted to make sure I could grab the data I needed. 😊

    I tried without {entries}, but then it just pulls a single gallery image. I think {entries} is the only way to get more than one?

  • #4 / Sep 26, 2012 5:29pm

    Kevin Smith

    4784 posts

    Hi Linda,

    I’m not sure why those tags aren’t working either. They certainly should. Be on the lookout for an email from me. I’d like to have a first-hand look at this one.

  • #5 / Sep 26, 2012 5:33pm

    Linda A

    666 posts

    Thanks, Kevin. 😊 I’ll get back to you with the details as soon as I can; right now the site is down due to excessive traffic.

  • #6 / Sep 27, 2012 10:33am

    Lisa Wess

    20502 posts

    Good morning!

    The Gallery Entries tag, when using the {entries} variable pair requires the {rows} tag pair - and your code doesn’t have it.

    Can you try adding that and seeing if you get some more data?

    Thanks!

  • #7 / Sep 27, 2012 10:58am

    Linda A

    666 posts

    That does it, thanks. 😊 Strange that the rest showed up. But it does seem to add markup that I need to get rid of to turn this into a csv format, hrm.

    edited to add: I see, it is just showing the markup from the caption that wasn’t showing earlier. So I can mass-edit out that most likely, or just grab the source.

    Is there a limit to how many entries I can export in one template? Or is that system-dependant?

  • #8 / Sep 27, 2012 11:12am

    Lisa Wess

    20502 posts

    Hey Linda -

    It’s going to be system and memory dependent.  You could start with a high limit - if you get a memory error (or a blank page: indicating a suppressed memory error in this case) then you would need to lower the limit until you find your max.

    Make sense?

  • #9 / Sep 27, 2012 11:25am

    Linda A

    666 posts

    Cool, that works. I was concerned that perhaps I’d start getting partial outputs that I wouldn’t realise were partial until later, but if it is likely to throw an error or a blank page, that should work very well.

    Thanks!

  • #10 / Sep 27, 2012 11:28am

    Lisa Wess

    20502 posts

    Yep, if you push it too far, then you’ll just run out of memory.  If you are worried about errors, then I’d hit ‘end’ and get to the end of the exported document and double check. 😊 That is where your error would be if there was one.

    I’m glad that you were able to get this moving along! If anything else comes up, please do let us know so we can help out.

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

ExpressionEngine News!

#eecms, #events, #releases