TimeLine : how to customize each block ?

More
3 years 11 months ago #213 by AlainR
Hello.
Thank you very much for your Timeline module. The rendering is extra.

I want to put different background colors to some items displayed in the timeline but there is no class that distinguishes them.

I thought about tags or categories, but it has no influence in the code when viewing the Timeline module.
For now, I added the variable $i incremented to a class (timeline-content and timeline-img), but since we want an antechronological display, my class will change with each new publication of article.

How could we easily solve this case?

Thank you in advance for your help.
Best regards.

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

More
3 years 11 months ago #214 by Gregorio
Hello AlainR,

if you want to color items in the same place, even in different modules, you can do it by just CSS code, using ":nth-child(N)".

Otherwise if you want to color elements by different categories, you can print the item category as CSS class, and assign to each class a different background color.

Could you meet your need by these solutions?

Kind regards,
Greg

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

More
3 years 11 months ago #215 by AlainR
Thank you very much for your very quick answer.
Solution 1 is not suitable, it is identical to the one I put in place.

The second solution would be really good. How to put it in place? what is the variable in your module that contains the category (in my case, it would be the subcategories of the category selected in the module parameters)?

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

More
3 years 11 months ago #216 by Gregorio
You're welcome.

Try to print "$item" in "default_timeline.php". Print that into each item container div. I think it's the result that you except.

You must select in module parameters all categories that you want to display into the module. By that data source, Digi Showcase pick only articles of selected categories.

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

More
3 years 11 months ago - 3 years 11 months ago #217 by AlainR
Thank you very much.
There's no $item, only $items but it's an Array.
But it's all right with echo $article[ 'categoryid']; (without space between [ and ')
Many thanks again and best regards.
Last edit: 3 years 11 months ago by AlainR.

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

More
3 years 11 months ago - 3 years 11 months ago #218 by Gregorio
Yes you have to explode the array. Then grab the data for each item (in this case Joomla articles).

Just, pay attention to the next update, because you have modified the helper file and it will be overwritten on update. Make a backup copy of that file.
As well as, we are working to make also helper.php file overraidable in the next module versions, to make easier the customizations. Stay in touch on our Facebook page.

If you can spend 3 minutes of your time, can you write a review on JED about Digi Showcase and its support? We would be really happy: extensions.joomla.org/extension/digi-showcase/
It's useful for us to support all free Joomla extensions that we provide.

Many thanks,
Kind regards
Last edit: 3 years 11 months ago by Gregorio.

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

Powered by Kunena Forum