Page 1 of 1

Customize the Detail View Buttons

Posted: 24 Mar 2015, 16:32
by jinshang
Dear Gurus,

I would like to modify the current detail views button with my bootstrap icons.

I managed to find out that detail view will call for $this->item->nextbutton

It will then create this HTML CSS code

<tdalign="right" width="30%" style="padding-right:48px"><div class="pg-imgbgd"><a href="/tyoga/index.php/component/phocagallery/1-test/detail/36-image-018?tmpl=component&Itemid=1" title="Next Image" id="next"><img src="/tyoga/media/com_phocagallery/images/icon-next.png" alt="Next Image"></a></div></td>

I wonder how do I disable the png file and replace it with my boostrap icon.

Thank you very much and have a great day ahead.

Cheers,

David

Re: Customize the Detail View Buttons

Posted: 25 Mar 2015, 00:06
by Jan
Hi, then you need to change the html code, to not get the classes which have image as background and change them with the bootstrap icon classes :idea:

Jan

Re: Customize the Detail View Buttons

Posted: 26 Mar 2015, 05:15
by jinshang
Hi Jan, thank you for your reply. I do indeed know that I need to change the HTML code, the problem is I dont know which file I need to edit (the one which maps the html code for nextbutton). I can't seem to find the core PHP file responsible for that. It would be awesome if you could point me to the right file. Or perhaps if you know any other way to replace it other than replacing the image file. It seems that the only way is to modify the HTML for that one.

Re: Customize the Detail View Buttons

Posted: 26 Mar 2015, 22:06
by Jan
Hi, the detail view is here:

components/com_phocagallery/views/detail/tmpl/default.php - but of course it can ask for help functions which are mostly stored in libraries folder:

administrator/components/com_phocagallery/libraries/phocagallery/ ...

Jan

Re: Customize the Detail View Buttons

Posted: 27 Mar 2015, 04:39
by jinshang
Hi Jan,

I tried tmpl but the HTML code does not seem to be there. I wonder if there is a way to include the libraries override somewhere. Or is it possible to make it easier for us to edit the buttons for future release?

Thank you very much Jan and cheers,

David

Re: Customize the Detail View Buttons

Posted: 27 Mar 2015, 16:33
by Jan
Hi, I think, the libraries cannot be overwritten, e.g. in template, etc.

The html is here:
components\com_phocagallery\views\detail\tmpl\default.php

Buttons here:
administrator\components\com_phocagallery\libraries\phocagallery\render\renderdetailbutton.php

Jan