Show title under category image?
-
Salocin
- Phoca Newbie

- Posts: 9
- Joined: 15 Aug 2010, 11:57
Show title under category image?
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
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
-
imperialWicket
- Phoca Enthusiast

- Posts: 78
- Joined: 28 Feb 2010, 15:39
Re: Show title under category image?
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.
-
Salocin
- Phoca Newbie

- Posts: 9
- Joined: 15 Aug 2010, 11:57
Re: Show title under category image?
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 
-
imperialWicket
- Phoca Enthusiast

- Posts: 78
- Joined: 28 Feb 2010, 15:39
Re: Show title under category image?
Which view are you using? Or, can you provide a URL or screenshot?
-
Salocin
- Phoca Newbie

- Posts: 9
- Joined: 15 Aug 2010, 11:57
Re: Show title under category image?
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
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
Last edited by Salocin on 15 Aug 2010, 20:58, edited 1 time in total.
-
imperialWicket
- Phoca Enthusiast

- Posts: 78
- Joined: 28 Feb 2010, 15:39
Re: Show title under category image?
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:
Ending the current row and beginning a new one should give you a title under image display:
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.
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> ';
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> ';
Good luck.
-
Salocin
- Phoca Newbie

- Posts: 9
- Joined: 15 Aug 2010, 11:57
Re: Show title under category image?
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?
-
imperialWicket
- Phoca Enthusiast

- Posts: 78
- Joined: 28 Feb 2010, 15:39
Re: Show title under category image?
It looks like you added "</tr><td>" instead of "</tr><tr>".
-
Salocin
- Phoca Newbie

- Posts: 9
- Joined: 15 Aug 2010, 11:57
Re: Show title under category image?
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?
Just one last thing: Where do I find the CSS-Sheet to center the text under the picture?
-
imperialWicket
- Phoca Enthusiast

- Posts: 78
- Joined: 28 Feb 2010, 15:39
Re: Show title under category image?
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:
and you should be in business.
Code: Select all
echo '<td align="center"><a href="'.$this->categories...