Hi Folks,
I'd like to have a panel on my root page that shows partner banner links. My first approach was to create a TopLinks sub-album and then use imageBlock to display it on root, but this didnt work because imageBlock doesnt support linkObjects.
My second idea was to reuse the basic structure of the album.tpl display (which I can more or less follow), but load data from a specific sub-album, but this is where I'm stuck...
from the within album.tpl (matrix)the code starts from:
{foreach from=$theme.children item=child}
<blah> <blah>
Obviously this is loading up the children of a the current page, does anyone know how to code a call to load children of a specific sub-album into this?
Would greatly appreciate your help!
Posts: 3
Bimble,
Did you figure this out? I'm trying to accomplish something similar.
--
John
Posts: 16504
Specific sub-album? No, I don't know how. I'd take a look at trying to use this inside either a separate PHP page or inside your template:
http://www.flashyourweb.com/staticpages/index.php?page=mediaBlock
To include PHP code in your template you can do this:
I've never tried that inside a template so I'm not 100% sure if it'll work.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 4342
It's not hard, but you'd need to be quite familiar with the G2 API. The correct way to achieve this is to:
- code a module that ...
- includes the code for a Callback function ...
- that's triggered from within your template (with the appropriate Callback syntax) ...
- that loads the data and makes it available within the template ...
- then your custom data can be referred to within that template.
If you want to be really fancy you could include the extra template contents as a "block" so you can add or remove it from pages on an album-by-album or global basis from within the theme configuration page.
Posts: 8339
Sounds like banner rotation.
MediaBlock can handle this easily. (Example - mediaBlock was used to rotate the inset image)
Each item it displays can have a customLink utilizing gallery's custom fields module.
The MiniSlideshow also has these capabilities.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2