Hi all,
I've been playing with G3 for the last few days now and am pretty happy with it. However, I can't figure out how to move individual blocks out of the sidebar and onto other parts of the page.
Most specifically, I want to move the RSS feeds section up into the header area and the IPTC metadata onto the page below the photo.
If I use the following code
<?= $theme->sidebar_blocks() ?>
I get everything that is in the sidebar.
If I use this...
<?= $theme->tag_menu() ?>
I get a link to the slideshow.
How do I just target individual blocks of code? What are the hooks I need to use and where do I find them?
TIA and kind regards,
{edited to improve the subject heading.}
Posts: 7994
Right now there's no easy API call to do that because the framework is gathering up the sidebar blocks when you do $theme->sidebar_blocks(). However, if you know the module you want you can always request it's block directly. Sof ro the RSS feed, you can do:
and you can get that block. Look in modules/*/helpers/*_block.php to get an idea of what blocks you can access that way.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!
Posts: 27
Many thanks Bharat,
Your RSS example worked perfectly and I've also managed to cobble together a snippet for IPTC.
Here is the code for anyone that is interested in displaying IPTC data elsewhere on the page.
<?= iptc_block::get("iptc", $theme) ?>
Thanks again and congratulations on a great gallery product.
regards,
Posts: 7994
Woot!
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!