Is there a way of creating an override for which tags are shown?
For instance I use Phoca Gallery for my wife's art at https://www.quigleyarts.co.uk/gallery. Each image is tagged and that's useful for a status like sold or prints available, but I'd like to add some hidden tags like the year it was painted or subject matter.
I could then use the hidden tags to create the static tab urls like the sold page at https://www.quigleyarts.co.uk/gallery/category/?tagid=1.
It would also be great if tags could have a certain colour assigned as well - so "sold" is red, "available" is blue etc? Is this possible as an override, or is that a feature request?
Thanks!
Using Joomla 3.9.18 and Phoca Gallery 4.3.18
Tag visibility and Colour
-
christine
- Phoca Hero

- Posts: 2938
- Joined: 28 Nov 2010, 17:20
Re: Tag visibility and Colour
Hi,

Kind regards
Christine
I don't know. But I tried an example from your URL, with html div class & CSS formatting (temporary):quiggles wrote: 01 May 2020, 12:53 It would also be great if tags could have a certain colour assigned as well - so "sold" is red, "available" is blue etc? Is this possible as an override, or is that a feature request?
Code: Select all
<div class="pg-cv-tags1"><span>Not For Sale</span> </div>
<div class="pg-cv-tags2"><span>Sold</span> </div>Code: Select all
.pg-cv-tags1 {
color: lightgreen;
text-align: right;
font-weight: bold;
}
.pg-cv-tags2 {
color:red;
text-align:right;
}
Kind regards
Christine
- Jan
- Phoca Hero

- Posts: 49138
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Tag visibility and Colour
Hi, the tags are rendered in this file:
components\com_phocagallery\views\category\tmpl\default_images.php - line cca 481, unfortunately as default, there is no identifiying of different tag.
I will add to next version, the code can be now changed here:
administrator\components\com_phocagallery\libraries\phocagallery\tag\tag.php - line cca 124
FROM:
TO:
Then each tag will have another class:

BTW: Maybe your needs on your site can be better solved by Phoca Cart component because it includes more advanced tag system including filtering and searching (tags, labels, parameters can be added and they can be differently displayed, etc.). Including the fact, that you can display price for some items, for another not (not for sale). Even you can have order or ask a question button, etc. etc. See example (displaying images, filtering tags, prices, descriptions, ask a question, etc.)
https://www.phoca.cz/jtd/
Jan
components\com_phocagallery\views\category\tmpl\default_images.php - line cca 481, unfortunately as default, there is no identifiying of different tag.
I will add to next version, the code can be now changed here:
administrator\components\com_phocagallery\libraries\phocagallery\tag\tag.php - line cca 124
FROM:
Code: Select all
$o .= '<span>';Code: Select all
$o .= '<span class="ph-tag-'.(int)$v->id.'">';
BTW: Maybe your needs on your site can be better solved by Phoca Cart component because it includes more advanced tag system including filtering and searching (tags, labels, parameters can be added and they can be differently displayed, etc.). Including the fact, that you can display price for some items, for another not (not for sale). Even you can have order or ask a question button, etc. etc. See example (displaying images, filtering tags, prices, descriptions, ask a question, etc.)
https://www.phoca.cz/jtd/
Jan
If you find Phoca extensions useful, please support the project
-
christine
- Phoca Hero

- Posts: 2938
- Joined: 28 Nov 2010, 17:20
Re: Tag visibility and Colour
Ah I see: <span> of the tag is unfortunately not generated in view or in layout, so you cannot override it with a template.
Thanks Jan
Christine
Thanks Jan
Christine
-
quiggles
- Phoca Member

- Posts: 18
- Joined: 22 Feb 2011, 02:25
Re: Tag visibility and Colour
Thanks Jan. Although the site references sold and unsold, we don't actually sell from the site because of agreements with galleries.
However I take your point that Phoca Cart may suit the requirements better - however, does that mean completely setting it up again or is there some transfer capability?
However I take your point that Phoca Cart may suit the requirements better - however, does that mean completely setting it up again or is there some transfer capability?
-
quiggles
- Phoca Member

- Posts: 18
- Joined: 22 Feb 2011, 02:25
Re: Tag visibility and Colour
Thanks Jan. That code works exactly as I needed - appreciate it!
Although the site references sold and unsold, we don't actually sell from the site because of agreements with galleries.
However I take your point that Phoca Cart may suit the requirements better - however, does that mean completely setting it up again or is there some transfer capability?
Although the site references sold and unsold, we don't actually sell from the site because of agreements with galleries.
However I take your point that Phoca Cart may suit the requirements better - however, does that mean completely setting it up again or is there some transfer capability?
- Jan
- Phoca Hero

- Posts: 49138
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Tag visibility and Colour
Hi, yes, Phoca Cart is just another component, so it needs to be done everything from scratch. Phoca Cart even works like catalogue so there is option to not sell anything by Phoca Cart. But as written above, filtering and tag system is much more improved.
Jan
Jan
If you find Phoca extensions useful, please support the project