Adding Class to BODY tag via MenuItem

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 160
Joined: Thu Dec 31, 2009 12:04 am

Adding Class to BODY tag via MenuItem

Post by grsamson » Fri Jul 12, 2019 1:28 am

In the Menu admin area, adding a class via the `Page Class` field (Under the `Page Display` tab) adds it to the <body > tag. However, if this is a Category page, it also adds this class to its children pages.

Is there a way to prevent this, so that it is added only to the parent? i.e. Is there a way to specifically add a class only to the Parent (category page) and not its children?


User avatar
Joomla! Explorer
Joomla! Explorer
Posts: 301
Joined: Sat Oct 30, 2010 12:32 pm
Location: Scotland

Re: Adding Class to BODY tag via MenuItem

Post by paulala » Fri Jul 12, 2019 4:14 pm

Does this post help?

Warm Regards,
Paula Livingstone, Skydiving Instructor and Network Security Consultant


Post Reply

Return to “General Questions/New to Joomla! 3.x”