Support Forums

Support Offline : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

Class suffix does not take effect

Featured Lock Resolved Issue
Hello,

Sorry I've posted it here but still no SP Glamour thread to choose.

I've created a class suffix for the home page and everything works great. Tried to use this class suffix for another page with no luck. Tried to create a new class suffix for this particular page and same bad luck. The class suffix is being totally ignored. I can't even see it in the code while I inspect the module.

This is a link to my home page. The main slider has several classes with homepage class suffix assigned to them. See #sp-position1 for example:
.homepage #sp-position1, .lorna #sp-position1 {
height: 800px;
}


http://fitin.guywalderonline.com/index.php/he/

This is a link to my other page. I've created a new class suffix "lorna" which can be seen in the home page while inspecting #sp-position1. I've assigned this class suffix to my page but there's no effect:
http://fitin.guywalderonline.com/index.php/he/%D7%9C%D7%95%D7%A8%D7%A0%D7%94-%D7%92%D7%99%D7%99%D7%9F

What am I missing here???

Thanks in advance,

Guy.

10 Answers

Alex Smirnov

More than a month ago #Permalink
Hello Guy,

Could you please tell us what exactly element you are trying to change styles for and how exactly you are looking to style it?

Regards,

Alex

Guy Walder

More than a month ago #Permalink
Hello Alex,

I've added some CSS to homepage class suffix and assigned it to my home page menu item. Every thing worked o.k.
Now I would like to assign the same homepage class suffix to another menu item but for some unknown reason the class suffix is being ignored.
This is the code I've added to class suffix home page in my custom.css file:
.homepage #sp-position1, .lorna #sp-position1{
height: 800px;
}

.homepage #sp-smart-slider {
position: fixed;
width: 100%;
}

.homepage #sp-content-top-wrapper, .homepage #sp-content-top2-wrapper, .homepage #sp-bottom-wrapper,
.homepage #sp-main-body-wrapper, .homepage #sp-footer-wrapper {
background: white;
position: relative;
}

I thought that maybe it has something to do with the class suffix itself so I've created a new one named lorna. when I inspect my homepage slider I can see the lorna class right next to the homepage class (see attached image). But when I inspect the other page with the lorna class suffix assigned to it there's nothing there.

Guy.

Attachments (1)

  • screenshot.jpg
    screenshot.jpg 220.1 KB

Guy Walder

More than a month ago #Permalink
Bump!

Guy Walder

More than a month ago #Permalink
Hello Joomshaper support team,

I've encountered this issue in another site I'm working on. This time I'm basing my site on Helix ii without ant template.
Once again, I've added the class suffix to my page with space before the name under Page Display -> Page class. I've created a class suffix in my css, once to custom.less file without any effect and another time to custom.css file. Again, no effect.

From inspecting the page HTML I could see that the class suffix was not added to the body tag. Instead there's a subpage class assigned to it.

Something is not working in Helix framework while trying to use class suffix for menu items. I've contacted Rifat regarding this issue before and he said he will look into it. Still haven't got a replay.

Class suffix for menu items is very commonly used and this should definitely be fixed.

I would REALLY appreciate your attention to this matter.

Regards,

Guy.

Guy Walder

More than a month ago #Permalink
Thanks for nothing Joomshaper.

To anyone how might face this issue in the past, to add class suffix to your pages you'll need to:
1. Open your index.php file under the template folder in a code editor.
2. Right above the starting <head> add this code (see attached image code1).
3. Right under the closing <head> replace this code (see attached image code2).
With this code (see image code3).
4. Add your class to the menu item under "Page Class" and don't forget the leading space.

Sorry about the images but the editor here striped my code from the post.

Done and done.

Attachments (3)

  • code1.jpg
    code1.jpg 25.3 KB
  • code2.jpg
    code2.jpg 11.5 KB
  • code3.jpg
    code3.jpg 15.9 KB

pepperstreet

More than a month ago #Permalink
Guy Walder wrote:
Thanks for nothing Joomshaper.

Hilarious! :) :p ;)

@Guy Walder
Why is this topic marked as "solved"? It should be open and of type request or bug.

@Joomshaper
Why is this J! standard feature not available? As far as I can see, it is still missing in HELIX v2 ... not to mention v3 !
Please, add it to both frameworks. This is a basic core option and parameter that should be supported.
Thanks in advance.

Attachments (1)

  • frontend_helix2_body_classes.png
    frontend_helix2_body_classes.png 20 KB

Guy Walder

More than a month ago #Permalink
pepperstreet, this was marked as solved because I've managed to solve it myself on Helix 2 and I've posted the solution here.
But, on Helix 3 still no go. I hope someone at Joomshaper will care enough to provide a solution.

pepperstreet

More than a month ago #Permalink
Guy Walder wrote:
pepperstreet, this was marked as solved because I've managed to solve it myself...


I see. However this should be "marked" as a REQUEST and open task for the support/dev team. This is a shortcoming of HELIX and a missing standard feature, IMHO.

BiLe

More than a month ago #Permalink
Basically we are trying to add a class for our pages with menu items:

Menu Item -> Page Display -> Page Class ( some_custom_class_for_page)

Helix3 will not implement the class with Joomla 3.5.1. Needed so we can identify a page.

pepperstreet

More than a month ago #Permalink
BiLe wrote:
Helix3 will not implement the class with Joomla 3.5.1. Needed so we can identify a page.


Real bummer! Unfortunately Helix3 does not utilize the PageClassSuffix parameter.
You might edit and modify the INDEX.php andimplement the code solution mentioned in the comments below...

Or you might use the "build-in" body classes. As far as I know, there is a class with the unique ITEMID. This should identify each MenuItem!


There are no replies made for this post yet.
Be one of the first to reply to this post!

Leaderboard (30 days)

Sifat

Sifat

Total Accepted Answers: 119
Paul Frankowski

Paul Frankowski

Total Accepted Answers: 107
Toufiq

Toufiq

Total Accepted Answers: 91
Kamruzzaman Alam

Kamruzzaman Alam

Total Accepted Answers: 3
FUTURECLIENT

FUTURECLIENT

Total Accepted Answers: 2

115

Templates

295918

Community Users

Newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us