Hey folks,
I'm creating a new entertainment site and had a quick question as to what is the best way to accomplish this:
The Feature Article content type needs to display say "quotes" from the article itself (as you see often in newspaper, just a small block with a quote .. a line from the article, or something the interviewed person said).
Would it be good to create a CCK field called "quote" where the author can type in a specific quote that he wants to display and then style that CCK field in our template.
Or
Would it be better to just style "blockquote" in our CSS and let people put in blockquotes within their article. Of course, I'd like this to be as easier as possible for the contributing author and probably defining that Quote field (a text field) would be easier.
Or is there a better way to do this?
Thanks in advance for your helpful replies.
AM
Comments
Using the CSS styling of the
Using the CSS styling of the blockquote might be the better way to go here.
You would have to possible put your CCK field at various points into your text, the position of which could vary from node to node, depending on where the quotes are in the article.
This would mean if the
This would mean if the author(contributor, writer) needed to quote a line from the interview or the article, he would have to use
(or [blockquote] for wysiwyg) correct?
Ok lets say having a quote would matter only in styling, the display of the news feature article (or interview) which would have the normal body text, cck fields for images (so that we can control the display, sizing etc of those images) and a quote shown similar to an image type.
As the news articles will be edited, that CCK field can only be available to the editor who can pick a line from the article that is catching and put that as a quote in the CCK field.
The CCK field would be styled to look like a blockquote at a specific location in an article (only one would be needed) and all articles in that specific content type would have a similar look and feel. (I guess this also means that I would have to split the body in different fields .... or else I wouldn't be able to place the quote in a specific location within the body, right?)
In addition, by making it on CCK field, I could also use view to show a block on the front page showing interesting quotes from articles linking that to the article in question right?
(I'm just thinking outloud here)
So final question is, would it be any less efficient to do so with a CCK field rather than just letting the writer use blockquote to display a quote / line from the article? Am I just complicating my life here and just leave it as blockquote as you suggested?
Finally would there be a way to do the final thing with blockquote (that is showing interesting lines from an article on the front page, sort of like excerpts or quotes so that if the line is catchy enough, the users can click on it to access the article?)
And thanks for your reply design_dolphin.
AM
You're welcome. :-) You have
You're welcome. :-)
You have some cool ideas.
As a writer myself I could not work with the constraint of being able only to put one quote in, and at a fixed place in a article. Also I am not sure how realistic this is in real life. But if this situation works fine for your client, then it could be a way to go. Maybe something to allow to add more CCK quotefields from the node edit menu. And allow the content creator to add placeholders in the node? Best of both worlds then.
How about a CCK field with the option 'show this quote on frontpage'? And then pass this variable through views for example? This would allow for one block, and make it easier for the content worker.
Hi there, Thanks for your
Hi there,
Thanks for your continued input and "brain-storming" on this issue with me. I like what you said, but I could use some help in implementing it.
Ok, so a CCK field that allows for multiple quotes to be added to the node. Of course the author (or the editor) would have to pick the catching phrases that he think can generate user interest in the quote and put them in that CCK field. What type of CCk field would that be? Text field? And how would text field allow multiple values to be put in that can be displayed? Or would it have to be multiple CCK fields --- field_quote1, field_quote2, field_quote3 (none of them required by default) and each being a text field? Any input on how to accomplish that would help.
Also, how would a "placeholder" be implemented? I'm not exactly sure how to do that either. I'm quite new to Drupal and still watching tons of tutorials, videos, reading books to learn it. The site is for myself and a bunch of my friends.. and I have had some experience with Drupal designing some corporate sites in the past with it, but never really took on a big project like this.
And lastly, "show this quote on a frontpage" I assume would have to be a single on/off checkbox field associated with each quote right?
Assuming we make field_quote1 -- field_showquote1 ; field_quote2 -- field_showquote2 ; etc.
Does that all make sense? If that is what you had in mind, then the only question remains is how would a "placeholder" be implemented. My friends are not all that HTML savvy, so it would have be very simple for them to be able to place news articles, interviews, etc and not require much coding. Of course I can place guidelines for them as to how to accomplish the "placeholder" part, but .. lol.. I'd have to know how to do that myself first :)
Any help would be appreciated and again, thanks for your continued input.
Regards
Amit
Take a look at these things.
Take a look at these things. Maybe they will help:
For the placeholder:
Take a look at the Token and Token Filter module. As well as this Replace CCK fields with token filter.
Yes, that would be the most customisable way to do it for the user. You might also decide to just show the whole fieldgroup, but I can see situations where the client would want to control which quotes they want to show on the front page.
Yes, the decision will be whether you have a certain amount of predefined quote CCK fields. So say 10. But what if the user wants to add 11 quotes? There are some topics on people trying to let a user add custom fields. Try a search on drupal.org for: allow user to add cck fields
Now I've never implemented anything like this before either on Drupal. So I really can't help you with the details of implementing, unfortunately.
Edit:
Another way to go could be to use the normal blockquote tag in the text, and then have a module look for this in nodes, and print the content in those out on the front page. However, having the user select which quotes to show would be a lot trickier. You might be able to use a blockquote class="first", and then have the PHP select this. Not sure if that is valid HTML though, but those are the only two options I can think of at the moment.
Good luck!
Thank you so much for that
Thank you so much for that detailed reply.
I looked at Token and Token filter, patched token filter with the link you recommended. And great, now the placeholder works. Indeed I've decided I'll let contributors add up to two predefined quotes. That should be enough and style them properly using the custom CCK field.
About how to show the quotes on the front page, I think I'll go with a check field to let the contributor (or the editor) select which quote to show on front page.
Thank you so much for your help. Really appreciated.
Amit