- Posts: 55
COMMUNITY FORUM
Featured Image
- NintendoNerds
-
Topic Author
- Offline
- Senior Member
dhoulmagus.nintendo-daily.com/news-info
Please Log in or Create an account to join the conversation.
- NintendoNerds
-
Topic Author
- Offline
- Senior Member
- Posts: 55
Please Log in or Create an account to join the conversation.
- Terry Britton
-
- Offline
- Elite Member
- Posts: 198
Please Log in or Create an account to join the conversation.
- NintendoNerds
-
Topic Author
- Offline
- Senior Member
- Posts: 55
Terry A Britton said:
No, it is not possible within K2 to do this without custom programing.
Please Log in or Create an account to join the conversation.
- BBC
-
- Offline
- Platinum Member
- Posts: 663
Or describe more detailed. You want an extra picture under detailed view ? Where precise, Height and width ? Etc ?
Please Log in or Create an account to join the conversation.
- Terry Britton
-
- Offline
- Elite Member
- Posts: 198
Please Log in or Create an account to join the conversation.
- NintendoNerds
-
Topic Author
- Offline
- Senior Member
- Posts: 55
BBC said:
Can you make a block picture in some graphic editor, how would it be ? Or describe more detailed. You want an extra picture under detailed view ? Where precise, Height and width ? Etc ?
Please Log in or Create an account to join the conversation.
- BBC
-
- Offline
- Platinum Member
- Posts: 663
Not so easy.
Please Log in or Create an account to join the conversation.
- NintendoNerds
-
Topic Author
- Offline
- Senior Member
- Posts: 55
BBC said:
As Terry said, it demands new upload function in item manager. Beside that one that already exist. Not so easy.
Please Log in or Create an account to join the conversation.
- BBC
-
- Offline
- Platinum Member
- Posts: 663
Please Log in or Create an account to join the conversation.
- NintendoNerds
-
Topic Author
- Offline
- Senior Member
- Posts: 55
BBC said:
Did you make this huge spacing by purpose ? Or is it template problem.
Please Log in or Create an account to join the conversation.
- BBC
-
- Offline
- Platinum Member
- Posts: 663
Please Log in or Create an account to join the conversation.
- BBC
-
- Offline
- Platinum Member
- Posts: 663
Please Log in or Create an account to join the conversation.
- Terry Britton
-
- Offline
- Elite Member
- Posts: 198
You can use the following to insert an image in item.php or category_item.php based on whether it is featured or not:
<?php if ($this->item->featured) : ?>
<img class="featured-image" src="/stories/icons/featured.jpg" alt="featured article"></img>
<?php endif; ?>
You would put this in the template at a location where you want the image to be. Obviously your html for the image would be different. You would then just have to play around with the positioning and the css to get the exact look you want.
Please Log in or Create an account to join the conversation.
- BBC
-
- Offline
- Platinum Member
- Posts: 663
That´s why i asked for more details.
Please Log in or Create an account to join the conversation.
- NintendoNerds
-
Topic Author
- Offline
- Senior Member
- Posts: 55
Terry A Britton said:
I always laugh at people who completely miss the actual question being asked, and here I did the same thing.
You can use the following to insert an image in item.php or category_item.php based on whether it is featured or not:
<?php if ($this->item->featured) : ?>
<img class="featured-image" src="/stories/icons/featured.jpg" alt="featured article"></img>
<?php endif; ?>
You would put this in the template at a location where you want the image to be. Obviously your html for the image would be different. You would then just have to play around with the positioning and the css to get the exact look you want.
Please Log in or Create an account to join the conversation.
- Terry Britton
-
- Offline
- Elite Member
- Posts: 198
The image in the category listing is wrapped by a div (catItemImageBlock). Within that same div in category_item.php you could put the following code. Sorry I can't give you an exact line number but my files are all heavily modified so the line numbers wouldn't match yours. Just search for catItemImageBlock.
<?php if ($this->item->featured) : ?>
<span class="featured">Featured</span>
<?php endif; ?>
You would then use css to position the text and style it the way you want to. I don't think you'll need z-index if you do it with text, but if you do, just put "z-index:99" in the css for featured. Backup your files before you start and hopefully someone else can step in if you have more questions.
Please Log in or Create an account to join the conversation.
- NintendoNerds
-
Topic Author
- Offline
- Senior Member
- Posts: 55
Terry A Britton said:
I'm getting ready to go on the road for a couple of weeks and won't be on the forum much, so I'll try to give you enough to get you started. I couldn't really see what you where talking about in the link you provided so I'll give you a couple of options. Firstly, you could display text over the image that says "Featured" or you could display an image in front of the other image that highlights the fact it is featured. If you do it with an image you will have to use z-index which allows you to stack items on top of each other, the higher the z-index the closer it is to the viewer.
The image in the category listing is wrapped by a div (catItemImageBlock). Within that same div in category_item.php you could put the following code. Sorry I can't give you an exact line number but my files are all heavily modified so the line numbers wouldn't match yours. Just search for catItemImageBlock.
<?php if ($this->item->featured) : ?>
<span class="featured">Featured</span>
<?php endif; ?>
You would then use css to position the text and style it the way you want to. I don't think you'll need z-index if you do it with text, but if you do, just put "z-index:99" in the css for featured. Backup your files before you start and hopefully someone else can step in if you have more questions.
Please Log in or Create an account to join the conversation.
- Terry Britton
-
- Offline
- Elite Member
- Posts: 198
Please Log in or Create an account to join the conversation.
- NintendoNerds
-
Topic Author
- Offline
- Senior Member
- Posts: 55
Terry A Britton said:
One more thing you'll probably have to set the div (catItemImageBlock) and the span (featured) to either float:left or float:right (both to the same) so you can display one on top of the other.
Please Log in or Create an account to join the conversation.