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?

Comments

himtuna’s picture

close it
sol: add
after evert allowed values

no2e’s picture

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)

himtuna’s picture

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

no2e’s picture

What do you mean? Allowed values? Where did you add it?

himtuna’s picture

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

no2e’s picture

@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?

himtuna’s picture

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

no2e’s picture

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?

no2e’s picture

Category: support » bug
himtuna’s picture

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.

no2e’s picture

why not you try using [...]

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:

(Body:)
football, cats

With CCK Blocks I get the output:

(Block 1:)
Animals
cats

(Block 2:)
Sports
football

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?

because i dont think without hacking the core you'll be able to add the separator token between values.

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.

no2e’s picture

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.

himtuna’s picture

KathyIce’s picture

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;
}

no2e’s picture

@#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).

no2e’s picture

Component: Documentation » Code

bump

Fanaile’s picture

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

Anonymous’s picture

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.

no2e’s picture

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.

Anonymous’s picture

What is the output of this field, if you display it with the main content and not with CCK blocks?

Fanaile’s picture

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

Anonymous’s picture

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?

Anonymous’s picture

Status: Active » Needs review
StatusFileSize
new772 bytes

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.

Fanaile’s picture

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.

Anonymous’s picture

Assigned: Unassigned »
david lesieur’s picture

Title: CCK Block shows everything in one line » CCK Blocks does not leverage CCK's templates
Version: 6.x-1.1 » 6.x-1.x-dev
Assigned: » david lesieur
StatusFileSize
new4.4 KB

I was expecting CCK Blocks to use the usual field templates (for example, content-field.tpl.php and content-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:

  • If you have themed your fields, then CCK Blocks will now output your themed result!
  • If a field is shared between multiple content types, you may now choose a different formatter for that field for each of those content types. Before this patch, CCK Blocks was limited to a single formatter per field, across all content types using that field.

To achieve this, CCK Blocks now works slightly differently:

  • The formatter is no longer selected in the block settings.
  • You choose a formatter for each field in 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.

david lesieur’s picture

StatusFileSize
new4.19 KB

Oops, please ignore the above patch. This is the right one.

Anonymous’s picture

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

david lesieur’s picture

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

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

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.

Anonymous’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in -dev.

Status: Fixed » Closed (fixed)

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