Hi,
I have seen: http://drupal.org/node/46415#comment-4603910 and imported this custom formatter (cf).
Now I would like to use this cf on a textfield long which is working

I made a new contenttype and added a textfield long to it and now I see the multiple column cf and selected it.
But how to get a newspaper like content output of this field please?

Thanks a lot in advance for your reply!
greetings, Martijn

CommentFileSizeAuthor
#1 newspaper_photo.jpg544.72 KBSummit
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Summit’s picture

FileSize
544.72 KB

Hi,

I have it working now! I need to add images within the tekst, say in column 2 and 3 with a 5 columns lay-out.
Do you may be have a suggestion? I have now the image in the first column, but it is not looking nice.
See attachment how it looks like now.

Would be great if image high and width would also be part of the formula and may be the image size can be put on 1,2 or 3 columns?
This way with the custom formatter a great newspaper look can be build within a node!

Greetings, Martijn

Deciphered’s picture

Status: Active » Postponed

Hi Summit,

It's a good idea, but would be tricky to make work, if I have some time I'll look further into it.

Summit’s picture

Status: Postponed » Active

Hi,
I would really love this. I set it to active, because I didn't see another (non-programmer) solution anywhere on drupal.org if it's ok?

I tried

1) [<table> cell-spacing ] solution. But then also on the first column there is cell-spacing, and that is not what I want
2) tried to get a panel-layout with this. I could not get a decent newspaper layout.
3) tried to get a display suite layout. Again could not find one with my needs.
4) tried to make within ckeditor a table with the different columns. This works a little bit, but to get newspaper layout I have to copy-paste exact amount of text in every column and see if it looks like a newspaper, so no final solution.

Would love to be able to have the newspaper-layout with image inclusion based on the custom formatter http://drupal.org/node/46415#comment-4603910.
may be with the height of the image as variable and the width of the image needs to be adapted by the sizes of the columns which the formula comes up with?
Just trying to think with you?

Thanks a lot in advance for your reply. Would be great if you would come up with a solution, than drupal can be used in an easy way for newspaper-layout also.
Special add-on what would be great is to be able to set the font type and font size also within the formula to arrange the columns nicely spread and on the bottom the same!

Greetings,
Martijn

Deciphered’s picture

Hi Martijn,

The biggest issue is that you'd need the font-height/line-height taken into account to calculate based on heights, whereas the existing solution just calculates based on character count. While it may be technically possible, and I might still look into it, this is definitely achievable with CSS3 Columns, and while I know that the reason I wrote the Formatter Approach in the first place is to support all non-CSS3 browsers and get the same effect, it might be a case of the complexity of the solution outweighs the benefits of supporting legacy browsers.

Too see it in practice, checkout http://www.quirksmode.org/css/multicolumn.html, and if you have Firebug you can edit the HTML of the columns example and stick an image in there, worked fine for me.

Cheers,
Deciphered.

Summit’s picture

Hi Deciphered,

I have seen his solution. There is a drupal module! http://drupal.org/project/multicolumn which makes a new input filter. But as you already explained it is not working for non-css3 browsers which is a necessity for my solution.

How about a solution in which the custom formatter calculates the font height/width and image height/width. I am not a programmer but the characters can then be calculated through font height/width and images through image height/width, right? Isn't that doable?

Greetings, Martijn

Deciphered’s picture

Status: Active » Postponed

Hi Martijn,

I just want to make it clear the level of complexity of what you're asking.

To calculate the height of text you will not only need to know the font-size and line-height, you'll also need to know the width of words so you can calculate what words will wrap to the next line, you'll also need to know any heights for paragraph margin/padding, and any other modifiers like link styling. You'd need to take into account extra long words, which may or may not wrap based on the current css. And then you have to take into account that every browser is likely to render the text slightly differently, as is the same browser on different OSs.

It's not an easy thing your asking for, and certainly not something that I could fit into the limited spare time that I have. It's really a case of if a client had these specific needs I would do my best to talk them out of them, the cost for the payoff is not equal.

I would recommend 2 solutions:
- The CSS3 solution (which you've already said you can't use)
- Manually tailoring the content in a Wysiwyg (using Wysiwyg layouts maybe?)

I'm not saying I won't ever write a formatter to do this, but given the complexity it's very unlikely. I'll mark this issue as postponed in the case that I do have time or someone else wants to tackle it.

Summit’s picture

Hi Deciphered,

I understand what you are saying. I did the solution with ckeditor and building a table like this:

|  text    | small column |  title    |   small column| text  |
|  text    | small column |   image   |   small column| text  |
|  text    | small column |   text    |   small column| text  |

But now I have to copy/paste finetune on and on..to get the newsaper look..Would be great if someone came up with an easy drupal solution!

Greetings, Martijn

DYdave’s picture

Hi Summit,

I was browsing around while investigating another issue and came across this post.

I was wondering if you ever considered using something like the Masonry module which seems to do exactly what you would be looking for with the "newspaper look".
It seems to implement the layout with Javascript based on the Jquery Masonry plugin.

I hope this could work for you and would be glad to hear your feedback on this.
Hope that helps.
Cheers!

Deciphered’s picture

Issue summary: View changes
Status: Postponed » Fixed

Status: Fixed » Closed (fixed)

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