You are here:Home»KB»Web Design»CMS»Joomla»Extensions»Phoca Gallery - putting the category images in a grid
Friday, 13 November 2015 13:55

Phoca Gallery - putting the category images in a grid

Written by

i have read the forum and the manual, but i cannot find a way to put categories that i include in an article in to a grid or at least all float left (display: inline-block) rather than a vertical list using:

{phocagallery view=categories|imagecategories=1|imagecategoriessize=1}
  • i am aware that i can surround stuff in divs and then style that, but the output using this plugin seems to be table based. I did give it a go.
  • i could not find a template file or css for the plugin.
  • is it possible to make the categories output in a grid, preferably one that i can set or a responsive float left or float right ?
  • will i have to actually edit the plugin code itself?

thanks

Solution

I had a look at editing the plugin, but i was not really keen to do that. You will love the solution i figured out and no core code or phocagallery code was harmed in the making of this.

Phocagallery when displaying a category through a link floats the categories exactly as i want, but my problem was that i wanted to display 2 categories like that, floated and below each other. However when you create a menu item you can only select 1 category and tweak it as needed.

So i used the following method to get the result i wanted:

  • I created a menu (but not attached to a module)
  • in this menu i created 2 phocagallery category links, each link pointing at their own respective category and tweaked as required
  • i created an article called Portfolio
  • I then use a plugin called 'Plugin include component' (available for free on jooml extensions) and included each of the menu items (via jlink) into the portfolio article. (i used a clear: both command between the two items just incase)
  • I then pointed a main menu item to the article, portfolio
  • i now have 2 x separate sub categories displayed on the same page, floated

You can use this method to get different layouts and the best thing is, upgrading will not break this method.

i hope this helps

My original post was on the Phoca Forums.

Read 1268 times