Page 1 of 1

How to display only one category in an article...

Posted: 14 May 2013, 23:20
by Karmageddon
... this question is answered very simple.
Just hide the categories you do not want to be shown as a gallery in your article. (It is very easy as I am using the Gallery Plugin & Gallery Button Plugin)

But when I add more and more new categories, add pictures to those categories, those new categories will be shown in every existing article (in addition to the existing category/gallery) where I added one single category and excluded all the others before. So I have to edit every single article again (excluding the new category so that this new gallery is not shown in the article). Right? Or is there another way to specify that I only want to show only THIS category in THAT article.

Actually I have got >30 articles. Every article has got ONE specified category gallery. But I will be adding several categories every month and every category is only displayed in one specified article.

Hope you know what I mean and that you can help me. Love the components you make!
(If you do not understand my english, just let me know, I can translate it to German (my motherlanguage) too :-) )

Kind regards
Karmageddon

Re: How to display only one category in an article...

Posted: 14 May 2013, 23:42
by Karmageddon
Ah ok I figured it out:
You have to edit the code that is added by the Gallery Button Plugin a bit.

Instead of excluding many categories like that:

Code: Select all

{phocagallery view=categories|imagecategories=1|imagecategoriessize=5|hidecategories=2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36}
I now write:

Code: Select all

{phocagallery view=categories|imagecategories=1|imagecategoriessize=5|categoryid=37}
Would it be possible to implement this funktion to the Gallery Button Plugin? That would be very very handy. :D

Kind regards
Karmageddon

Re: How to display only one category in an article...

Posted: 25 May 2013, 12:55
by Jan
Hi, this is in feature request list.

Jan

Re: How to display only one category in an article...

Posted: 30 Mar 2016, 21:47
by edox677
Hi

I tried to display only one category in a single article. How can I select only one category instead of hiding other categories.
The mentioned code above didn't work at my joomla.

Can you help me please??
Thanks

Re: How to display only one category in an article...

Posted: 30 Mar 2016, 22:29
by Benno
Hi,
see documentation: https://www.phoca.cz/documents/14-phoca- ... ery-plugin
Add the following code into the article:
Categories displaying

phocagallery - display Phoca Gallery Plugin
view - categories | category | switchimage - display all categories, some image from category or the switch image
categoryid - number - ID of category which you want to display, in case of only 1 category[...]
Kind regards,
Benno

Re: How to display only one category in an article...

Posted: 31 Mar 2016, 07:18
by edox677
Hi Benno

so what I did was this:

Code: Select all

{phocagallery view=category|imagecategories=1|imagecategoriessize=1|categoryid=1}
instead of using

Code: Select all

{phocagallery view=categories|imagecategories=1|imagecategoriessize=1|hidecategories=2,3,4,5,6,7,8}
only the last code line would work! Where is the error?

Re: How to display only one category in an article...

Posted: 31 Mar 2016, 19:28
by Benno
Hi,
Categories View (example code):

Code: Select all

{phocagallery view=categories|categoryid=1|imagecategories=1|imagecategoriessize=5}
Category View (example code):

Code: Select all

{phocagallery view=category|categoryid=1|limitstart=0|limitcount=0}
Result in frontend:
Image

Kind regards,
Benno

Re: How to display only one category in an article...

Posted: 31 Mar 2016, 20:59
by edox677
Thx, now it works.
I had another bug too. I also refered to a category that didn't include any pictures.

Re: How to display only one category in an article...

Posted: 31 Mar 2016, 22:06
by Benno
You're welcome!

Kind regards,
Benno