Index > Contao core > image news site
Greetings,
I am developing a news site and I need to put a small picture in front of each news but when you click read more ... The same image is enlarged bigger.
I put an example of what I need:
http://www.drivesouth.co.nz/news
This is possible in typolight?
Thanks for your help,
I am developing a news site and I need to put a small picture in front of each news but when you click read more ... The same image is enlarged bigger.
I put an example of what I need:
http://www.drivesouth.co.nz/news
This is possible in typolight?
Thanks for your help,
2008-10-30 14:29
Hi tecnomaster,
at the moment tl news module doesn't offer "also show image in list-view if news article has one". But you can change the template files to achieve that. Simply put
Image resizing could become a problem then. If the differences between full size and small size ain't too big you could leave resizing to the browser. Else you'd have to tweak an extra call to the function "getImage" somewhere into the module.
The above is fairly easy to achieve, but your example shows a gallery in the news article. TL news only allows one image, so that would mean some serious amount of programming. Probably a custom module that adds to the news module. Depends on your budget and skills...
cheers
Antipitch
at the moment tl news module doesn't offer "also show image in list-view if news article has one". But you can change the template files to achieve that. Simply put
into a custom news_list template.Code:
<?php if ($this->addImage): ?> <img src="<?php echo $this->src; ?>" /> <?php endif; ?>
Image resizing could become a problem then. If the differences between full size and small size ain't too big you could leave resizing to the browser. Else you'd have to tweak an extra call to the function "getImage" somewhere into the module.
The above is fairly easy to achieve, but your example shows a gallery in the news article. TL news only allows one image, so that would mean some serious amount of programming. Probably a custom module that adds to the news module. Depends on your budget and skills...
cheers
Antipitch
2008-10-30 15:12
Hello Antipitch,
Thanks for your response,
I do not need the gallery. Only thing I want to do is put the small image in front and to read the article in full this the same image in a larger size.
With the code you send can be achieved?
Thank you
Thanks for your response,
I do not need the gallery. Only thing I want to do is put the small image in front and to read the article in full this the same image in a larger size.
With the code you send can be achieved?
Thank you
2008-10-30 16:07
Hi tecnomaster,
this is possible with tl and nothing else.
You can give the Image in the List view an smaler size.
At the Artikel the Image can be 100% ore what you want.
this is possible with tl and nothing else.
You can give the Image in the List view an smaler size.
At the Artikel the Image can be 100% ore what you want.
-=42=-
2008-10-30 16:16
MacKP:
Hi tecnomaster,
this is possible with tl and nothing else.
You can give the Image in the List view an smaler size.
At the Artikel the Image can be 100% ore what you want.
Hello,
I can explain how to achieve it?
Thank you
2008-10-31 22:01
Hello tecnomaster,
I'm sorry.. that will be possible in the TL 2.6.2 (tomorrow it comes out I think) ;-)
Here is a short Tipp:
You can use this Inserttag:
Here an example:
Take a look in the dokumentation from the Inserttags for that.
This code is for the template you use, I think it's the news_short.tpl (First copy that template in the folder "templates" and then do what ever you want in the copy).
I hope you know what I mean.. my english is not so good ;-)
regards
I'm sorry.. that will be possible in the TL 2.6.2 (tomorrow it comes out I think) ;-)
Here is a short Tipp:
You can use this Inserttag:
Code:
{{image::<?php echo $this->src; ?> ...}}
Here an example:
Code:
{{image::<?php echo $this->src; ?>?width=120&height=80&alt=alternative texte&class=my_class_for_that}}
Take a look in the dokumentation from the Inserttags for that.
This code is for the template you use, I think it's the news_short.tpl (First copy that template in the folder "templates" and then do what ever you want in the copy).
I hope you know what I mean.. my english is not so good ;-)
regards
-=42=-
2008-10-31 22:39
