I have both taxonomy image and taxonomy list installed.
I am able to view my terms in the page,taxonomy/vocabulary/5, displayed 4 items in a row. That what I want.
However, when I add a block of the above in the "content" region, the taxonomy images are arranged one in each row (zebra).
Questions:
1. How do I override the theme, so that it displayed 4 items in a row, just like what I have in "taxonomy/vocabulary/5"?
2. Alternatively, how do I display "taxonomy/vocabulary/5" in a block in the "content" region?
Thank you for your time.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | block.jpg | 61.76 KB | jessicakoh |
| #3 | tax2.jpg | 77.54 KB | jessicakoh |
Comments
Comment #1
nancydruHmm, I'll have to look and see if this can be done. I think I never considered full width blocks when I decided to force block to one wide.
Comment #2
nancydruI'm not crazy about this, but it should work: In your block, include this PHP code:
taxonomy_list_show(5, 'all', 'block', 4)Where "5" is the vocabulary and "4" is the number of columns.
Comment #3
jessicakoh commentedEven if I put
taxonomy_list_show(17, 'all', 'block', 4), would I get the "original" size taxonomy image as in Taxonomy Image?I have tried Views. Did not workout yet.
Am I in the right direction? Should I be working in Views Taxonomy Image or modify Taxonomy List?
Please advise. Take a look at the attachment.
Thank you for your time. Appreciated.
Comment #4
nancydruYour first snippet is theme code, which is not what you asked about. The second snippet is what should be in a PHP format block under admin/build/blocks. It is essentially the same code that the module would call and should properly build the block contents the same way the module would.
Comment #5
jessicakoh commentedI see.
It did not work. Here is the screenshot.
Thank you for being helpful. :)
Comment #6
nancydruWhat did it do?
Comment #7
jessicakoh commented1. Add Block.
2. Type the snippet below
3. Input type - PHP
4. Add the block in the "Content" region.
No result. Did I missed out something?
Comment #8
nancydruI did this and it worked fine:
Comment #9
nancydruYou need the "return"
Comment #10
jessicakoh commentedThank you, Nancy.
It works. Yeah, you aright, I missed out the "return".
One more minor problem, the taxonomy list (images) is 32 x 32 pixel. How do I use the "Original" size, as what I have with "taxonomy/vocabulary/5"?
I appreciate your patience.
Comment #11
nancydruI'll have to do some more digging after church because I don't remember off the top of my head why it would be different. Obviously, I need to do some block clean up in version 2.
Comment #12
nancydruChange
return taxonomy_list_show(3, 'all', 'block', 4);To:
return taxonomy_list_show(3, 'all', NULL, 4);Comment #13
jessicakoh commentedThank you, NancyDru. This solved the problem.
I am opening up taxonomy_list.module to learn more.
Thank you for your time. Appreciated.
Comment #14
nancydruJessica, don't spend too much time because version 2 is coming soon and it is quite different. And, BTW will come with a theme_taxonomy_list_block.
Comment #15
jessicakoh commentedThank you.
Love it.
Keep up the good work.
Comment #16
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.