fbpx
Introducing JD Builder - Now Beat the unbeatable designsDownload For Free
Welcome, Guest
Username: Password: Remember me

Need a new feature in Astroid?

Submit feature requests on github and help improve Astroid.

Submit Now

TOPIC: How to do add my custom class to the body?

How to do add my custom class to the body? 1 month 1 day ago #17591

We have ability to add custom classes to each section, each row, each element etc.
What if we will be able to add one custom class to the body and use it in custom.scss to correctly override astroid css rules?
Warning: Spoiler! [ Click to expand ]


Show me the way without changing template core files of cource
The administrator has disabled public write access.

How to do add my custom class to the body? 1 month 1 day ago #17593

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 2948
  • Thank you received: 449
  • Karma: 94
Hello,

You can display custom class on body level. Using the layout manager you can also added classes to all sections, rows & columns as well (all manually).

Can you tell me what you are trying to accomplish, may be I have a different approach?

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

How to do add my custom class to the body? 1 month 1 day ago #17595

admin wrote:
You can display custom class on body level.
How to do it?
The administrator has disabled public write access.

How to do add my custom class to the body? 1 month 1 day ago #17596

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 2948
  • Thank you received: 449
  • Karma: 94
Use Page class suffix on the menu item.
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

How to do add my custom class to the body? 1 month 1 day ago #17597

admin wrote:
Use Page class suffix on the menu item.
This is bad practice in this case. We speak about css rules. This method requires add class to all items and dont forget to add to new items.
And pages without menu item will not get custom class at all.

Maybe you mean something else than I think?
The administrator has disabled public write access.

How to do add my custom class to the body? 1 month 1 day ago #17598

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 2948
  • Thank you received: 449
  • Karma: 94
I understand what you are looking for. We had this before as well and there are a few things.
You have a unique style id already in the body class that's true for the current template style and will be there for all new pages as well. That should solve it.

Do have a look at the following commit:
github.com/joomdev/Astroid-Framework/com...0f23aa9d5e17b53b80e5
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

How to do add my custom class to the body? 1 month 1 day ago #17600

I dont understand.
Here are my body classes: site astroid-framework com-content view-article layout-default itemid-103 masters tp-style-9 ltr ru-RU astroid-device-xl
I need custom user defined class that will be the same (not uniq) on any site page. This gives convenient sass working with other astroid devs classes. There is no need any other low level classes such sections or rows after we have one custom class at the top
The administrator has disabled public write access.

How to do add my custom class to the body? 1 month 1 day ago #17602

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 2948
  • Thank you received: 449
  • Karma: 94
tp-style-9 will be same for all pages for your astroid style.

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

How to do add my custom class to the body? 1 month 1 day ago #17610

admin wrote:
tp-style-9 will be same for all pages for your astroid style.
Why tp-style-9 ? How it is generate?
I think new feature in settings is better because this style is not obvious for all users
The administrator has disabled public write access.

How to do add my custom class to the body? 1 month 1 day ago #17615

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 2948
  • Thank you received: 449
  • Karma: 94
9 is the ID of the style of your website in template manager. So, it's unique to your website but same for all pages on this style/template.

Thank you,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.
Moderators: chandandeep
Time to create page: 0.223 seconds