CCK Blocks does not leverage CCK's templates
himtuna - September 8, 2008 - 16:08
| Project: | CCK Blocks |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | David Lesieur |
| Status: | closed |
Description
Please visit this http://www.stxaviers.edu.in/teachers/lilly_abrahim
and there is one block subject, I want the teacher's subject to be displayed in different lines.
But the block shows everything in one line, without any separator.
Is there any way to add a separator b/w the cck fields?

#1
close it
sol: add
after evert allowed values
#2
I got the same problem. Output is
<div class="content"><a href="foobar1">foobar1</a><a href="foobar2">foobar2</a><a href="foobar3">foobar3</a></div>No spaces between the links, without any markup (list would be useful)
#3
in th allowed values I added a br tag.
tyr this
<div class="content"><a href="foobar1">foobar1</a><br /><a href="foobar2">foobar2</a><a href="foobar3">foobar3</a></div>Gamers' Den
#4
What do you mean? Allowed values? Where did you add it?
#5
In the cck fields.
Go to
>content types
>manage fields (select your desired field)
>then at the bottom you see, allowed values.
after every allowed value I added a
tag.
____________________________________________
Gamers' Den
#6
@himtuna:
Hmmm, I use CCK fields with Content Taxonomy. I can't find any option "Allowed values" in the configuration of the fields.
Does it work for you for "free tagging" fields, too?
#7
Sorry budy never tried with taxonomy terms. I'll see more into the matter afterwards. I got my exams, will over by friday (IST:GMT+5.30)
Till than Take Care.
Gamers' Den
#8
Got still this problem.
All terms are displayed in one line (without space between each one).
They should use HTML list (ul) markup.
Any idea?
#9
#10
you have taxonomy terms attached to a cck fields...........................
why not you try using
http://drupal.org/project/tagadelic
http://drupal.org/project/nodecloud
because i dont think without hacking the core you'll be able to add the separator token between values.
#11
Maybe I'm wrong, but: nodecloud or tagadelic don't offer the feature of CCK Blocks (do they?)
I want to display the terms wich are assigned to a single node (1.) in blocks, (2.) sorted by vocabulary.
Default Drupal behaviour is displaying all terms together mixed up in the body.
So, if a node has the terms "football" (Vocabulary: Sports) and "cats" (Vocabulary: Animals),
Drupal (default) outputs the following:
With CCK Blocks I get the output:
If I'm right, tagadelic outputs all terms (of all selected vocabularies), wheter they are tagged to a specific node or not. Or am I wrong?
In my opinion it should be the default behaviour of this module. I mean ... it's kind of a list (and you can style a list via CSS in whatever way you want). Semantically: outputting tagged terms is listing tagged terms. And listing in HTML is using
ul.#12
I was partly wrong: tagadelic offers "Tags for the current post", which lists(!) all tags assigned to the node. But it offers no deeper configuration. So all vocabularies get listed (but only those, which use "Tags" - but I got several vocabularies without tags) and each vocabulary is linked to it's tagadelic page (which is not what I always want).
So, I think CCK Blocks should be the right choice for more specific needs.
#13
tryy these mods
http://drupal.org/project/block_class
http://drupal.org/project/blocktheme
#14
I am using CCK Blocks with node reference... so I don't get a lot of HTML to work with. However, for this case, I managed to work around this problem by overriding the tag in my style sheet:
.block-cck_blocks .content a {
display: list-item;
}
#15
@#13 himtuna:
"block_class" would only let me change the CSS, and not the HTML, or am I wrong?
"blocktheme": will it allow me to change the HTML output? Didn't get it completly at the moment, will look into it.
@#14 KathyIce:
Unfortuneately, this is no solution for me, because it's the CSS only (and not the HTML markup).
#16
bump
#17
Hi;
I'm having the same problem with links appearing all on one line (you can see here: http://the-fiction-addiction.com/book-review/21-humanizing-anne-boleyn). I cannot find anything that reads "Allowed Values" for me to edit to place the edits mentioned about.
The field is called "field_book_links" (Buy or Reserve Your Copy).
Has anyone had any luck with this yet? Thanks
#18
I can't see links in one line, on none of the websites linked here. Please describe the problem more detailed. Styling your output is not this modules business. Maybe you can post a link, where we can see the actual problem.
#19
Have no online version of it (because I stopped using this module), but I got the markup described in #2, when I used Content Taxonomy.
#20
What is the output of this field, if you display it with the main content and not with CCK blocks?
#21
@forschi;
Sorry, I had disabled the block a few days after I wrote that up; I've re-enabled the block so you can see it now.
#22
What field type are you using for the links? Did you install an aditional module for the links?
I'm setting up a test page to reproduce this bug. At the moment, I have cck and cck_blocks installed. Do I need anything else to reproduce it?
#23
okay, I identified the problem in the way, items are displayed at the moment. They are only put into the nodes content, each with:
$block['content'] .= module_invoke('content', 'format', $fields[$delta], $item, $settings['formatter'], $node);I created a patch that solves the problem (quick, but dirty). I created the task #458700: Implement hook_theme() to enalbe users to provide a template for each of the cck_blocks, so we can use theming for this purpose in the future.
Please have a look at the patch, if it solves the problem for you.
#24
Thanks, I'll take a look at this as soon as I can.
I'm in the middle of transferring another of my sites over to a new server, so it may take me a couple days if someone has a chance to get to it before I do.
#25
#26
I was expecting CCK Blocks to use the usual field templates (for example,
content-field.tpl.phpandcontent-field-field_myfield.tpl.php), but it did not. To get a consistent output in node views and CCK Blocks, the most logical approach seems to go through drupal_render(), which will take care of the theming layer. To do so, we have to first build the $node->content array, so the next logical step is to add a new build mode for CCK.So that is what this new patch does.
The benefits of this patch:
To achieve this, CCK Blocks now works slightly differently:
admin/content/node-type/NODETYPE/display/cck_blocks. You may want to check "Exclude" next to each field that you don't plan to use in a block.I'm just beginning to experiment with this patch, but so far it seems to work nicely.
#27
Oops, please ignore the above patch. This is the right one.
#28
Thanks David for that patch. Unfortunately, it is such an effort, to apply patches on windows, that I'm not able, to test it.
It seems, that you considered #465326: content_format() does not handle multiple values correctly, but I want to link to that here to keep all information together.
Best wishes,
forschi
#29
@forschi: Yes, with the proposed patch above, multiple values are handled properly.
For applying patches under Windows, you might want to install Cygwin. With Cygwin, you can get a Unix shell and patch utilities; this makes patching files a breeze. There is some info here.
#30
Okay, it seems to work for me, too. Thanks for that. The patch is committed to -dev.
By the way: cygwin is the worst crap I've ever seen. Didn't get it to work. Lost time. I'm now using eclipse and everything seems to be fine.
#31
Fixed in -dev.
#32
Automatically closed -- issue fixed for 2 weeks with no activity.