Hello everyone.
With this line in templates/local/album.tpl:
{g->block type="imageblock.ImageBlock" blocks="randomImage" maxSize="500" showDate=0 showOwner=0 showViews=0 showTitle=0 showHeading=0 useDefaults=0}
i was able to put a random image in the main page. Is it possible to specify which album those random images should be from?
Like when you use an external imageblock and you use this line:
<?php @readfile('http://www.lucasmarin.com/gallery2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_itemId=733'); ?>
that g2_itemId is the album i want to show the images from...
any help?
Thank you very much!
http://www.lucasmarin.com
Posts: 8339
I'd assume you could simply add itemId=xx
but you can also use mediaBlock.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 37
Hey thanks a lot! it seems to have worked! i have no idea how i didnt try it like that, so simple... i was adding g2_itemId=xx without success... but itemId=xx worked perfect! what is the difference? Thank you very much again!
http://www.lucasmarin.com
Posts: 4342
g2_ is the (default) prefix added to parameters in urls. A prefix may be needed there if, for example, G2 is in embedded mode and the url is an extension of a url which already has parameters intended for another web application. For instance itemId=xxxx in the url could be intended for a CMS system to display a particular page, in which a G2 image was embedded, so ensuring that Gallery2 uses g2_itemId in that context avoids a conflict.
Within a smarty template the parameter is simply itemId=... - there's no conflict and no prefices are used.
Posts: 37
Well, thank you very much alec. This is really complicated, there is not like a step by step "dumbproof" tutorial, but i´m learning a lot, and with the help of everyone here in the forum my gallery is starting to be like i want it to. Thanks again!
http://www.lucasmarin.com