[SOLVED] Multicategory view - how to get image, title / description of every category

More
9 years 6 months ago - 9 years 6 months ago #54685 by agata
Hello,
In the menu item for a muticategory view there is a tab for Parameters: Category Info & Options however I don't understand where the image and description configured in the options in that tab would be retrieved from. I tried setting a default image in case there was no category image, like so
Code:
<?php if (!empty($this->category->image))?> <div class="content-top__bg" style="background-image:url('<?php echo $this->category->image_src; ?>');"></div> <?php else:?> <div class="content-top__bg" style="background-image:url('/images/429.jpg');"></div> <?php endif;?>
but it doesn't work.
Thanks,
Agata
Last edit: 9 years 6 months ago by ggppdk.

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

More
9 years 6 months ago - 9 years 6 months ago #54686 by ggppdk
Hello

so you want to do custom template?

you will need to use for:
- subcategories
Code:
foreach ($this->categories as $cat) { echo $cat->image; // This is the thumbnail image with optional category link echo $cat->title; // This is title echo $cat->description; // ... echo $cat->params('image'); // The filename of the image }

- peer categories
Code:
foreach ($this->peercats as $cat) { ... }

to get more info do:
Code:
echo "<pre>"; print_r($cat); echo "<pre>"; exit;


-- 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...
Last edit: 9 years 6 months ago by ggppdk.

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

More
9 years 6 months ago - 9 years 6 months ago #54687 by agata
Hi, thanks but I don't have problems with sub- and peer-category images but there's yet another tab there, just like for a single category, that handles the image and description for the multicat page the menu item leads to

www.dropbox.com/s/p4sudfx6f5ysxjo/Screen...%2017.09.45.png?dl=0

I hope this clears things up.
Agata
Last edit: 9 years 6 months ago by agata.

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

More
9 years 6 months ago - 9 years 6 months ago #54689 by ggppdk
Hello

i see, we need to update our menu item to avoid confusion

The TAB in the picture, is applicable in views

- single category
- tags (new* in v3 BETA7 via category view) limited to a specific category
- favourites (new* in v3 BETA7 via category view) limited to a specific category
- myitems, limited to a specific category
- author items, limited to a specific category


For
-- multicategory view, the "sub categories" parameters are used and you will need to use:
Code:
foreach ($this->categories as $cat) { echo $cat->image; // This is the thumbnail image with optional category link echo $cat->title; // This is title echo $cat->description; // ... echo $cat->params('image'); // The filename of the image }


-- 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...
Last edit: 9 years 6 months ago by ggppdk.
The following user(s) said Thank You: agata

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

More
9 years 6 months ago #54693 by agata
I was afraid this was so, thank you for your assistance with this.
Best,
Agata

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.989 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