Page 1 of 2
Show title under category image?
Posted: 15 Aug 2010, 13:11
by Salocin
Hallo,
I'd really love to use this gallery, but I would like to display the category title under the category image. How is this possible? At the moment the title is beside the image and this isn't really fine.
Could anybody give me a hint?
best regards,
Salocin
Re: Show title under category image?
Posted: 15 Aug 2010, 14:10
by imperialWicket
This
thread discusses a few modifications to the categories view, one of which is changing the styling such that the image does not float left, and the text does not have a large left margin. Changing those styles should help you out, there some other tips in the thread, as well as references to the appropriate files.
Re: Show title under category image?
Posted: 15 Aug 2010, 15:37
by Salocin
Thanks. But the problem discussed in this thread is "slightly" different to my problem. As I'm not fit in programming I can't adopt their solution

Re: Show title under category image?
Posted: 15 Aug 2010, 18:09
by imperialWicket
Which view are you using? Or, can you provide a URL or screenshot?
Re: Show title under category image?
Posted: 15 Aug 2010, 18:30
by Salocin
Hallo,
I use the Category list layout. You can have a look here:
http://tiny.cc/qmw7u So far, there is onlay one category, as I'm stillt testing.
best regards,
Salocin
Re: Show title under category image?
Posted: 15 Aug 2010, 18:46
by imperialWicket
The table markup is being generated in components/com_phocagallery/views/categories/tmpl/default.php.
It looks like you are using the configuration option Display Categories Style: Categories and images (sorry, all my references are going to be the English text). In the php file, this is commented as "// TABLE LAYOUT" around line 61.
At line 91, the default.php file begins the second column of the table:
Code: Select all
echo '</a></td>';
echo '<td><a href="'.$this->categories[$i]->link.'" class="category'.$this->params->get( 'pageclass_sfx' ).'">'.$this->categories[$i]->title.'</a> ';
Ending the current row and beginning a new one should give you a title under image display:
Code: Select all
echo '</a></td>';
echo '</tr><tr>;
echo '<td><a href="'.$this->categories[$i]->link.'" class="category'.$this->params->get( 'pageclass_sfx' ).'">'.$this->categories[$i]->title.'</a> ';
You might need to play with the css a little bit to get the display exactly as you want it, but you can control most of the display possibilities in that area of that file.
Good luck.
Re: Show title under category image?
Posted: 15 Aug 2010, 19:27
by Salocin
Thanks very much! It's a step in the right direction. But unfortunately the text is just placed deeper beside the picture but not right under the picture. But I guess that's not a CSS-Problem, is it?
Re: Show title under category image?
Posted: 15 Aug 2010, 19:36
by imperialWicket
It looks like you added "</tr><td>" instead of "</tr><tr>".
Re: Show title under category image?
Posted: 15 Aug 2010, 19:42
by Salocin
Oh, yes! You're right. Thank you very much!
Just one last thing: Where do I find the CSS-Sheet to center the text under the picture?
Re: Show title under category image?
Posted: 15 Aug 2010, 19:49
by imperialWicket
The Phoca Gallery code adds a category class to the category links, so you could add a .category reference to any css sheet that is being loaded on the page (probably your primary template stylesheet). However, the first row in the table is being aligned inline, so it seems logical to me to simply add the align="center" to the second row of your table (the row you just added). This would be the first <td> tag from the original line 92 (which is probably line 93 now for your file). Just add the alignment so it reads:
Code: Select all
echo '<td align="center"><a href="'.$this->categories...
and you should be in business.