Hi All ,
How to display the latest article with lead image and teaser using views,
For example ,
Am posting article
Around 500 lines , the article contains around 4 images ,
Now i want to display only first image and Teaser , using view ,
Image must aligned in left ,
*Lorem Title *
* IMAGE AREA Lorem Ipsum* is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Did you try it? Seems like a bit too trivial to explain how to do it. Have you read any documentation on views? What does not work for you?
Hans
2009/5/30 bharani kumar bharanikumariyerphp@gmail.com
Hi All ,
How to display the latest article with lead image and teaser using views,
For example ,
Am posting article
Around 500 lines , the article contains around 4 images ,
Now i want to display only first image and Teaser , using view ,
Image must aligned in left ,
*Lorem Title *
- IMAGE AREA Lorem Ipsum* is simply dummy text of the printing and
typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. -- [ Drupal support list | http://lists.drupal.org/ ]
I know the steps to display the latest or forthcoming article , But i don't know , here my requirement is ,
Article with lead image,
Also that image must align left ,
Got it ,
Still am not started ,
Thanks
On Sat, May 30, 2009 at 9:32 PM, KOBA | Hans Rossel hans.rossel@koba.bewrote:
Did you try it? Seems like a bit too trivial to explain how to do it. Have you read any documentation on views? What does not work for you?
Hans
2009/5/30 bharani kumar bharanikumariyerphp@gmail.com
Hi All ,
How to display the latest article with lead image and teaser using views,
For example ,
Am posting article
Around 500 lines , the article contains around 4 images ,
Now i want to display only first image and Teaser , using view ,
Image must aligned in left ,
*Lorem Title *
- IMAGE AREA Lorem Ipsum* is simply dummy text of the printing and
typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. -- [ Drupal support list | http://lists.drupal.org/ ]
-- Hans Rossel KOBA Webdevelopment Kerkstraat 228 9050 Gent 09-334.52.60 0472-79.32.16 www.koba.be info@koba.be
-- [ Drupal support list | http://lists.drupal.org/ ]
You could use image_attach (which comes with image module), but I don't recall if it allows align left (it aligns right by default). Check it out.
Otherwise:
1. Simply attach the image to the nodes of type "article". 2. Theme the content type via node-article.tpl.php
Do some research with the devel module (tab: devel render) to see how you can find and print out and wrap in selectors and theme the image attached to the node.
Hint: iid
Victor Kane http://awebfactory.com.ar http://projectflowandtracker
On Sun, May 31, 2009 at 12:47 AM, bharani kumar < bharanikumariyerphp@gmail.com> wrote:
I know the steps to display the latest or forthcoming article , But i don't know , here my requirement is ,
Article with lead image,
Also that image must align left ,
Got it ,
Still am not started ,
Thanks
On Sat, May 30, 2009 at 9:32 PM, KOBA | Hans Rossel hans.rossel@koba.bewrote:
Did you try it? Seems like a bit too trivial to explain how to do it. Have you read any documentation on views? What does not work for you?
Hans
2009/5/30 bharani kumar bharanikumariyerphp@gmail.com
Hi All ,
How to display the latest article with lead image and teaser using views,
For example ,
Am posting article
Around 500 lines , the article contains around 4 images ,
Now i want to display only first image and Teaser , using view ,
Image must aligned in left ,
*Lorem Title *
- IMAGE AREA Lorem Ipsum* is simply dummy text of the printing and
typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. -- [ Drupal support list | http://lists.drupal.org/ ]
-- Hans Rossel KOBA Webdevelopment Kerkstraat 228 9050 Gent 09-334.52.60 0472-79.32.16 www.koba.be info@koba.be
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Regards B.S.Bharanikumar http://php-mysql-jquery.blogspot.com/
-- [ Drupal support list | http://lists.drupal.org/ ]
Displaying an image left is just basic css, there is no need to make a custom template for that, make sure the order is title, image, content in the view. #id_of_the_view img { float:left; margin-right:10px; }
If you don't understand this code, it's a good idea to buy a book on css or to check out http://www.w3schools.com/css/. http://www.w3schools.com/css/
I personally prefer imagefield above image_attach because fields are a lot more futureproof (and in Drupal 7 core) and because fields naturally have a very good integration with views.
To show only one the first image for the imagefield select the image settings in the view. Choose "group multiple values" and "show 1 value starting from 0" to show only the first image.
To show shorter version, just choose "trim this field to a maximum length" in the view, this is a lot more flexible and adjustable than teasers (which go up in steps of 200). Since this option in views, teasers have no more function I think. Use a text field instead of body and remove body.
Hans www.koba.be
2009/5/31 Victor Kane victorkane@gmail.com
You could use image_attach (which comes with image module), but I don't recall if it allows align left (it aligns right by default). Check it out.
Otherwise:
- Simply attach the image to the nodes of type "article".
- Theme the content type via node-article.tpl.php
Do some research with the devel module (tab: devel render) to see how you can find and print out and wrap in selectors and theme the image attached to the node.
Hint: iid
Victor Kane http://awebfactory.com.ar http://projectflowandtracker