Does anyone know how to add CSS classes to body tag, entities and fields?
They really should add this function to all the Entities forms.
Adding CSS classes to body tag, entities and fields
-
- Posts: 7
- Joined: 16 Mar 2024, 21:11
- Name: Manon Michel
- Location: Stroudsburg PA USA
- Company Name: Manon Etc
- Contact:
- support
- Site Admin
- Posts: 6222
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Adding CSS classes to body tag, entities and fields
Not clear what do you mean.
-
- Posts: 7
- Joined: 16 Mar 2024, 21:11
- Name: Manon Michel
- Location: Stroudsburg PA USA
- Company Name: Manon Etc
- Contact:
Re: Adding CSS classes to body tag, entities and fields
Right now, all of the html is very generic with no differentiation between entities, fields, etc.
I would like to add a CSS class to different entities.
For instance, if I create an entity called CRM, I would like to add a CSS class to the .page-content class for that entity called "entity-crm" so that I can customize that entity rather than style all the entities with the same style.
I would also like to apply this to fields so that I can target my custom CSS to one field rather than all the fields.
I would like to add a CSS class to different entities.
For instance, if I create an entity called CRM, I would like to add a CSS class to the .page-content class for that entity called "entity-crm" so that I can customize that entity rather than style all the entities with the same style.
I would also like to apply this to fields so that I can target my custom CSS to one field rather than all the fields.
-
- Posts: 7
- Joined: 16 Mar 2024, 21:11
- Name: Manon Michel
- Location: Stroudsburg PA USA
- Company Name: Manon Etc
- Contact:
Re: Adding CSS classes to body tag, entities and fields
Alright, it's slow going but I was able to target the Item Page Configuration's JS CODE with the following code:
const element = document.querySelector('div.page-content');
element.classList.add('entity-project');
console.log(element.className);
And it works.
I'm slowly going over how to target specific fields with id. I just wish you had a way to input all this via the field and entity configuration forms, as I have a lot of fields.
Anyway, I guess this post should be under SUGGESTIONS?
const element = document.querySelector('div.page-content');
element.classList.add('entity-project');
console.log(element.className);
And it works.
I'm slowly going over how to target specific fields with id. I just wish you had a way to input all this via the field and entity configuration forms, as I have a lot of fields.
Anyway, I guess this post should be under SUGGESTIONS?
-
- Posts: 9
- Joined: 05 Apr 2021, 13:54
- Name: Andrea
- Location: Monfalcone
- Company Name: ABC Service
- Contact:
Re: Adding CSS classes to body tag, entities and fields
confirm, some html tags are missing of classes and ID in the code
Andrea
Andrea