PDA

View Full Version : Limit thumbs in Gallery by category?


Tom K
01-02-2008, 03:58 PM
I have a pixelpost powered photoblog and on the main Gallery page I limit the number of thumbnails to 30 per page. Currently a list of numbers under the 30 thumbs is at 13 indicating 13 pages. That way I don't have several hundred thumbs on one page.

What I would like to do (but don't know how) is the limit the thumbs "per category" such as when someone hits "Landscapes" it would also limit the thumbs to 30 per page. As it stands now the "Landscape" category shows every corresponding thumbnail to every landscape photo in the entire photoblog. I want to limit that to just 30 per page.

Can it be done?
If so.......how?

Here are the examples. The main gallery shows the 30 thumbs with the numbers underneath to indicate another page: http://www.tomkaszuba.com/index.php?x=browse&pagenum=1

Now the Landscape page shows all the thumbs: http://www.tomkaszuba.com/index.php?x=browse&category=2

Thanks you,
Tom K.

dakwegmo
01-02-2008, 04:37 PM
It can be done with both Categories and Tags.
For Categories, you would just need to add the pagenumber to your link, like this:
http://www.tomkaszuba.com/index.php?x=browse&category=2&pagenum=1

Using the <CATEGORY_LINKS_AS_LIST> tag, will display the above link for each of your categories.

Tom K
01-03-2008, 04:46 AM
I added the tag to the browse_template.html page and it worked with one side effect. I got a long list on the page of all the categories. How do I reposition that list to the left of the thumbnails?

If I could do that I would be all set.

Now....I don't mind having it set up the way dakwegmo indicted above either.......I just can't seem to get rid of the listed categories when I use the <CATEGORY_LINKS_LIST_PAGED> tag. If it didn't actually show the list that would be something I could use as well.

dakwegmo
01-03-2008, 04:45 PM
You can use CSS to style the list.

Check the documentation. There are a lot of tags for paged browsing: categories, tags, etc. Most of the tags you're looking for have _PAGED in them.

Tom K
01-04-2008, 05:20 AM
Check the documentation. There are a lot of tags for paged browsing: categories, tags, etc. Most of the tags you're looking for have _PAGED in them.

OK. I went back to the drop down menu and it works just beautifully. I am using the <BROWSE_CATEGORIES_PAGED> tag. Thank you very much for the advice.

One problem I would like to correct however is that now the page (xhtml) does not validate in W3C: http://www.tomkaszuba.com/index.php?x=browse&pagenum=1

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.tomkaszuba.com%2Findex. php%3Fx%3Dbrowse%26pagenum%3D1

How can I get this to validate?

Thanks very much for all the assistance.

Dkozikowski
01-04-2008, 05:29 AM
The W3C validator does not recognize the attribute onChange due to the capitol C in onChange.

To correct the problem, open the paged_archive.php file located within your addons/ folder and replace all instances of onChange with onchange.

Tom K
01-04-2008, 06:22 AM
Holy Smokes dwilkinsjr+! That was quick...........and it worked like a charm. Many thanks to you.

Tom K.
www.tomkaszuba.com

Dkozikowski
01-04-2008, 06:48 AM
We don't mess around ;)

If we're online and know the answer or at least a suggestion, you'll get a response ASAP.