Author Topic: Random Image placement  (Read 2122 times)


  • Guest
Random Image placement
« on: January 30, 2008, 12:59:24 AM »
Hello, I posted this in the HELP section but thought this would be better here... sorry for the double post.

For my question...

I have installed the Random Image module and have it working great by inserting RandomImage('/media/pics'); into a code section BUT I actually would like it to appear on the right side of my content area where I have a table set up. I only need this on one page so thats why im using a table to create 2 columns with text on the left and the Random Image on the right. Any ideas on what to do about getting it to show up there huh

Thank you!

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8333
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
Re: Random Image placement
« Reply #1 on: January 30, 2008, 07:51:13 AM »

if you only need this on one page, make a copy of the template. The only difference should be that one is with random imag and one is without random image. Then change name and dir in info.php and install the copy of the template. Now simply set for pages where random image should appear the template of the one with random image and on all other pages the template without random image.



  • Guest
Re: Random Image placement
« Reply #2 on: January 30, 2008, 08:34:32 PM »
Thanks so much, your suggestion worked perfectly!  :-D

I've used Joomla a few times before and so I didn't think of making another template since from my experience you can only have one template in Joomla but this is great that WebsiteBaker can do this.


Offline sparkdigital

  • Posts: 366
  • Once a baker, always a baker!
    • romantic hotels
Re: Random Image placement
« Reply #3 on: February 20, 2008, 08:13:56 AM »

I've done something similar to what you're asking:
> add a content block to your template page
> go to 'manage sections' of the page where you would like the random image to appear
> add a 'code' block to that page
> in 'modify page' simply paste the random image code <?php RandomImage(MEDIA_DIRECTORY .'/random');>
> save the page.

This way there's no need for extra templates that need updating when you make any changes etc.

Hope this helps!