New kind of articles, same format

More
6 years 8 months ago #72556 by hervemlam
Hello,

So far I had only one kind of articles in my website (album reviews).
Now I'd like to add a new kind of articles (artist interviews).

As I like the fields, ideas and design of the first kind, I will more or less fit the second kind to the same fields and design.

But there will be a few differences:
1) In the category view (both kinds must appear in the same list at homepage), I want the cell for the article of the new kind to appear in a new background colour, to distinguish from the others.
2) In the article view, I want the field labels to be slightly different. (And maybe the new background colour too.)

How do you think I should proceed?
Is a sub-category appropriate?

Thanks for the advice you could bring me.

Good night.
HervE

PHP 8.1.16
Joomla! 4.3.3
FLEXIcontent 4.1.5

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

More
6 years 8 months ago #72558 by micker
if you want the same template use specific class in first div content

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
6 years 8 months ago #72560 by hervemlam
Hello micker,

Yes, it should work this way, but how would I recognize which articles are of this new kind and should use this specific class?

HervE

PHP 8.1.16
Joomla! 4.3.3
FLEXIcontent 4.1.5

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

More
6 years 8 months ago #72565 by micker
you can add it in custom php

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
6 years 8 months ago #72567 by hervemlam
Custom PHP of course, but how will I test if it is one kind of article or the other? That's my question.

HervE

PHP 8.1.16
Joomla! 4.3.3
FLEXIcontent 4.1.5

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

More
6 years 8 months ago #72568 by micker
2 ways
create a field to choose a class
use a existing field
if this field isn"t display put in render only position

and after edit your code and add for exemple
<div class="<?php echo $item->fields["yourfieldname"]->display; ?>"> at top level in your template ...
now you can target it easier like
.yourfieldvalue .label{} or other style

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]
The following user(s) said Thank You: hervemlam

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

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