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.

CommentFileSizeAuthor
#5 block.jpg61.76 KBjessicakoh
#3 tax2.jpg77.54 KBjessicakoh

Comments

nancydru’s picture

Hmm, 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.

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Active » Postponed (maintainer needs more info)

I'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.

jessicakoh’s picture

StatusFileSize
new77.54 KB
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block block-<?php print $block->module ?>">

<?php if ($block->subject): ?>
  <h2><?php print $block->subject ?></h2>
<?php endif;?>

  <div class="block-content"><?php print $block->content ?></div>
  
  <?php taxonomy_list_show(17, 'all', 'block', 4) ?>
  
 </div>

Even 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.

nancydru’s picture

Your 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.

jessicakoh’s picture

StatusFileSize
new61.76 KB

I see.

It did not work. Here is the screenshot.

Thank you for being helpful. :)

nancydru’s picture

What did it do?

jessicakoh’s picture

1. Add Block.
2. Type the snippet below

<?php
taxonomy_list_show(17, 'all', 'block', 4) 
?>

3. Input type - PHP
4. Add the block in the "Content" region.

No result. Did I missed out something?

nancydru’s picture

I did this and it worked fine:

 if (function_exists('taxonomy_list_show')) {
  return taxonomy_list_show(3, 'all', 'block', 4);
 }
 else {
  return 'oops';
 }

nancydru’s picture

You need the "return"

jessicakoh’s picture

Thank 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.

nancydru’s picture

I'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.

nancydru’s picture

Change return taxonomy_list_show(3, 'all', 'block', 4);

To: return taxonomy_list_show(3, 'all', NULL, 4);

jessicakoh’s picture

Thank you, NancyDru. This solved the problem.

I am opening up taxonomy_list.module to learn more.

Thank you for your time. Appreciated.

nancydru’s picture

Status: Postponed (maintainer needs more info) » Fixed

Jessica, 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.

jessicakoh’s picture

Thank you.

Love it.

Keep up the good work.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.