I'm trying to pull together a "magic" image include. It's got to:
- style our images consistently (with some styling flexibility)
- pull images and captions together from flickr, using just the photo-ID
- offer source flexibility for images & captions
- require the barest minimum from the user.
So far, it works pretty well, but I'm still working to get to #4. The pages:
- the layout
- the include passthrough
- Front-end pages:
The ingredients:
- RSS from a Pipe that calls the caption from Flickr's API.
- Erich's tricky include method.
I've seen some similar thinking about this idea — here, for instance. And there's some dev thinking on a future image module. But neither of these alternatives automatically fold flickr's captions into the mix.
The challenge is how to pare the front end down to its absolute barest basics. Using only the flickr photo-ID, we can pull the caption automatically. But how to turn off the caption simply by specifying a new one? Right now, I can make that happen with a separate toggle: "flickr-nocap=@@", but that's pretty kludgy.
I'm thinking the passthrough include should do something like this:
| caption={$caption} | caption={$flickr's_caption} | caption=@@
That way, the assignment sequence is (1) user's preference, (2) flickr caption (if present), and (3) none. Thing is, the flickr caption happens via a feed module, which I can't pass through the intermediate include. So right now the back-end layout has two separate "tricky" show/hide captions, toggled by {$caption} and {$flickr-nocap}/{$flickr-ID}, respectively. I prefer a single toggle. I'm pretty sure I can't nest one "tricky" inside another, or can I?. Ouch — my brain hurts again.
For flickr images, can you think of a way to override the flickr-caption with a user caption, simply by specifying "caption= _ _ _ _ _ _" in the include?
Thanks for any ideas.