Page 1 of 1
Tag visibility and Colour
Posted: 01 May 2020, 12:53
by quiggles
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
Re: Tag visibility and Colour
Posted: 02 May 2020, 13:54
by christine
Hi,
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?
I don't know. But I tried an example from your URL, with html div class & CSS formatting (temporary):
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
Re: Tag visibility and Colour
Posted: 02 May 2020, 15:06
by Jan
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:
Code: Select all
$o .= '<span class="ph-tag-'.(int)$v->id.'">';
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
Re: Tag visibility and Colour
Posted: 02 May 2020, 15:48
by christine
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
Re: Tag visibility and Colour
Posted: 11 May 2020, 13:29
by quiggles
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?
Re: Tag visibility and Colour
Posted: 11 May 2020, 14:01
by quiggles
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?
Re: Tag visibility and Colour
Posted: 11 May 2020, 17:35
by Jan
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