Use category image inside item view

More
9 years 6 months ago #50496 by danio_d
Hello,

Just as you say. Picture not included in content but via parameter.

Yes, I use the FC module.

But I did not find (do not know) how can I pull photo category in view Item List (not in Category List).

I'm not sure do You know what I mean?

I need to show in module last 3 article from subcategories. Every item have title, category name and category photo.
And I don't now how show this category photo.

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #50497 by ggppdk
Hello

i understand

1. the "categories" field only shows category title,

2. the module will show category information, title, description, image, etc
-- not inside the item list,
-- but above a set of items belonging to same category

and this is inside the "category list: ..." slider (j2.5) / tab (j3)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #50508 by danio_d
Yes, I know that. But ...
My module is shown 3 recently added articles to six sub-categories.
The settings you're talking about, do not give me the opportunity to show 3 subcategories with the latest articles. Then show the newest categorie. Maybe I set something wrong?

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #50512 by ggppdk
Hello

yes the use of "category list" is not appropriate in this case

you will need to custom the template file,

e.g. mynews.php

with for example:
Code:
<?php $category = JCategories::getInstance('Content')->get($item->catid); ?> <?php if ($category->getParams()->get('image')):?> <img src="<?php echo $category->getParams()->get('image'); ?>"/> <?php endif; ?>

notice that we use:
$item->catid
instead of:
$this->item->catid

which we used inside the item view

in any case you should use the item variable that is used inside THE ITEM LOOP:

e.g. you will find inside the news
Code:
<?php foreach ($list[$ord]['featured'] as $item) : ?> ... // USE HERE <?php endforeach; ?> <?php foreach ($list[$ord]['standard'] as $item) : ?> ... // USE HERE <?php endforeach; ?>


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #50532 by danio_d
Again, thank you,

This is exactly what I needed.

Once again, you helped me a lot.
Thank you and best regards,
Daniel

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.274 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline