Hi Guys,
Hope this is the right place to post, theme development is closer than any other forum area. I basically looking for some help or ideas on how you would layout the following.
I've used CCK to create a content type that fits the needs for publishing articles written in a magazine to the web. So I have Author, Date, Title, Body etc, but I've also added a field for 'Pull Out Quotes'. Currently my theme just chucks these out at the bottom of the node after all the other fields (as that's the order they're in the content type).
But what I'd really like is to have them part way through the node, in a larger font and different colour, with the node wrapping around them.
I can imagine using views to create a block out these quotes, but no idea how that would work dynamically, so when each article is added the block automatically appears with the right quote in and only shows on the node page.
I can also see some potential in just a CSS approach, but not sure exactly how I would position it so it doesn't cover over any of the body.
The other dilemma is on the number of quotes, will it be easier to set a fixed number that have to be there, or will flexibility not be that hard to achieve (we're only talking 1-3 quotes per node).
I've not seen any examples of this in Drupal, so if you know it would great to see.
Thanks
S
Comments
If you only ...
If you only had one quote, it'd be pretty straightforward CSS work. If anyone can imagine a way to have CSS automagically place 0 to N quotes in boxes separated by Y space, I'd love to see it, and I'd be quite impressed.
You might need to (in node.tpl.php) cook up a new content variable by copying from $node->content, counting paragraphs, and inserting pullquotes (in divs, of course) at proper intervals. CSS can then handle the styling.
Thanks for the reply. So
Thanks for the reply. So supposing I limit this to one Quote. What's the best method to use in CSS?
I know css pretty well, but wouldn't say I'm a guru when it comes to positioning!
Currently the div's are structured like this at the bottom of the node:
I'll loose the Field Label and want it in a div that's about half the width of the div the body text is in, so the body flows around it. See below, the + represents the quote placement and = the body text. The problem as I see it is that all the = are in one div and broken in p tags. The + is outside the body tag.
============
============
+++++=======
+++++=======
+++++=======
============
============
Any thoughts?
S
Pullquote module
A new module can now do this easily. See http://drupal.org/project/pullquote.