Suffixes for pages not working
Professional Joomla social template with metro design and JomSocial extension support.
Rate this topic: 




1.00 out of 6 based on 1 vote(s)
- GK User
- Wed Sep 24, 2014 3:38 am
- Reply with quote
- Report this post
Hi,
I defined a page suffix in template features based on a menu item ID (107=social) to apply a custom style to this menu item, but i don't see where this suffix was applied.
I think it´s suposed appear as a class of the body tag, but there's nothing there.
Additionally, the template come with a frontpage suffix defined and, in the same way, i don´t see it nowhere. Strangely in the Msocial demo the frontpage class appears in the body tag!!!
Thanks in advance,
Semedo
---
http://www.asterisco.com.pt/habitovar3/
Joomla 3.x installation
I defined a page suffix in template features based on a menu item ID (107=social) to apply a custom style to this menu item, but i don't see where this suffix was applied.
I think it´s suposed appear as a class of the body tag, but there's nothing there.
Additionally, the template come with a frontpage suffix defined and, in the same way, i don´t see it nowhere. Strangely in the Msocial demo the frontpage class appears in the body tag!!!
Capturar.PNG
Thanks in advance,
Semedo
---
http://www.asterisco.com.pt/habitovar3/
Joomla 3.x installation
-

- Junior Boarder
- teitbite
- Wed Sep 24, 2014 11:13 am
- Reply with quote
- Report this post
Hi
This class should appear in <body> element as You have with "frontpage", so looks like it it working. Please check the ID of the menu item You want to add this page class suffix to and if it's correct send me an access to joomla panel.
This class should appear in <body> element as You have with "frontpage", so looks like it it working. Please check the ID of the menu item You want to add this page class suffix to and if it's correct send me an access to joomla panel.
-

- Moderator
- GK User
- Wed Sep 24, 2014 4:40 pm
- Reply with quote
- Report this post
teitbite wrote:Hi
This class should appear in <body> element as You have with "frontpage", so looks like it it working. Please check the ID of the menu item You want to add this page class suffix to and if it's correct send me an access to joomla panel.
I checked the ID of the menu item and it's correct.
Capturar1.PNG
As i mentioned in the previous post neither one of the classes (frontpage or social) appears in the body tag!!!
I send you a PM with joomla access to see if you can help me.
Thanks in advance,
Semedo
-

- Junior Boarder
- teitbite
- Thu Sep 25, 2014 4:51 pm
- Reply with quote
- Report this post
Hi
I have not received a PM from You. Please send it one more time and check if You have no other styles of this template and if the suffix is applied to proper one.
I have not received a PM from You. Please send it one more time and check if You have no other styles of this template and if the suffix is applied to proper one.
-

- Moderator
- teitbite
- Fri Sep 26, 2014 12:04 pm
- Reply with quote
- Report this post
Hi
Ok. I've just checked and everything is configured properly but page class suffixes are not working, so I've installed a copy on my localhost and it works there as well. So this looks like there were some modifications done to the code. Since the code for this is located in <body> than it could even be a hack attempt. Please send me an access to FTP. I'll check what is going on.
Ok. I've just checked and everything is configured properly but page class suffixes are not working, so I've installed a copy on my localhost and it works there as well. So this looks like there were some modifications done to the code. Since the code for this is located in <body> than it could even be a hack attempt. Please send me an access to FTP. I'll check what is going on.
-

- Moderator
- teitbite
- Fri Sep 26, 2014 9:29 pm
- Reply with quote
- Report this post
Hi
I've found a bug. In /layout/default.php there is:
and should be:
I've found a bug. In /layout/default.php there is:
- Code: Select all
if($this->API->get('template_style', '1') == 2) {
$tpl_page_suffix = $this->page_suffix != 'class=pattern"'.$this->API->get('template_pattern', '1').'"' ? ' class="'.$this->page_suffix.' pattern'.$this->API->get('template_pattern', '1').'"' : '';
}
and should be:
- Code: Select all
$tpl_page_suffix = $this->page_suffix != '' ? ' class="'.$this->page_suffix.'"' : '';
-

- Moderator
- GK User
- Sat Sep 27, 2014 12:04 am
- Reply with quote
- Report this post
teitbite wrote:Hi
I've found a bug. In /layout/default.php there is:
- Code: Select all
if($this->API->get('template_style', '1') == 2) {
$tpl_page_suffix = $this->page_suffix != 'class=pattern"'.$this->API->get('template_pattern', '1').'"' ? ' class="'.$this->page_suffix.' pattern'.$this->API->get('template_pattern', '1').'"' : '';
}
and should be:
- Code: Select all
$tpl_page_suffix = $this->page_suffix != '' ? ' class="'.$this->page_suffix.'"' : '';
Thanks for the help!
I commented the first block of code
- Code: Select all
if($this->API->get('template_style', '1') == 2) {
$tpl_page_suffix = $this->page_suffix != 'class=pattern"'.$this->API->get('template_pattern', '1').'"' ? ' class="'.$this->page_suffix.' pattern'.$this->API->get('template_pattern', '1').'"' : '';
}
and apparently all works fine now! The class sufixes are finally displayed!
I just commented the first block of code and did not replaced it with the code you suggested,
- Code: Select all
$tpl_page_suffix = $this->page_suffix != '' ? ' class="'.$this->page_suffix.'"' : '';
because this already existed in the file after the block of code you refer as a bug!
I still have a doubt! I looked at some sites of other users with this template and that problem didn't exist!
I suppose this is a bug of the 3.x version of the template that not exist in 2.5 version?
-

- Junior Boarder
- teitbite
- Sat Sep 27, 2014 11:14 am
- Reply with quote
- Report this post
Hi
I've applied the fix to Your site as soon as I discovered it
You did not need to do anything 
Problem is reported to programmers. Package will be updated with this fix soon.
I've applied the fix to Your site as soon as I discovered it
Problem is reported to programmers. Package will be updated with this fix soon.
-

- Moderator
- GK User
- Sat Sep 27, 2014 11:50 am
- Reply with quote
- Report this post
teitbite wrote:Hi
I've applied the fix to Your site as soon as I discovered itYou did not need to do anything
Problem is reported to programmers. Package will be updated with this fix soon.
Ok thank for your help! I was going crazy -

- Junior Boarder
- GK User
- Fri Jan 30, 2015 12:13 pm
- Reply with quote
- Report this post
I'm having the exact same problem as decribed here, with the Gk_msocial template 3.15
I've tried modifying the layouts/default.php file as described but I'm still do not see class in the <body> element...
I'm totally novice to this, but can you confirm I need to replace:
with
Thank you very much if you can help!
I've tried modifying the layouts/default.php file as described but I'm still do not see class in the <body> element...
I'm totally novice to this, but can you confirm I need to replace:
- Code: Select all
if($this->API->get('template_style', '1') == 2) {
$tpl_page_suffix = $this->page_suffix != 'class=pattern"'.$this->API->get('template_pattern', '1').'"' ? ' class="'.$this->page_suffix.' pattern'.$this->API->get('template_pattern', '1').'"' : '';
}
with
- Code: Select all
if($this->API->get('template_style', '1') == 2) {
$tpl_page_suffix = $this->page_suffix != '' ? ' class="'.$this->page_suffix.'"' : '';
}
Thank you very much if you can help!
-

- Fresh Boarder
- teitbite
- Fri Jan 30, 2015 10:25 pm
- Reply with quote
- Report this post
Hi
I'm afraid I cannot confirm without looking into the code of Your website, but before sending me an access to ftp, joomla panel and site's url just try to use the code mentioned.
I'm afraid I cannot confirm without looking into the code of Your website, but before sending me an access to ftp, joomla panel and site's url just try to use the code mentioned.
-

- Moderator
- GK User
- Fri Jan 30, 2015 10:43 pm
- Reply with quote
- Report this post
I can verify this issue is not working in m-social.
So you need to put in the following:
Replace:
with
Worked well for me and is the same code as is on other templates.
So you need to put in the following:
Replace:
- Code: Select all
if($this->API->get('template_style', '1') == 2) {
$tpl_page_suffix = $this->page_suffix != 'class=pattern"'.$this->API->get('template_pattern', '1').'"' ? ' class="'.$this->page_suffix.' pattern'.$this->API->get('template_pattern', '1').'"' : '';
with
- Code: Select all
$tpl_page_suffix = $this->page_suffix != '' ? ' class="'.$this->page_suffix.'"' : '';
Worked well for me and is the same code as is on other templates.
-

- Fresh Boarder
- teitbite
- Sun Feb 01, 2015 10:57 pm
- Reply with quote
- Report this post
Hi
Yes. This extra code should resolve some additional suffixes for patterns, but I think it broke the regular page class suffixes. Thank You for letting me know that this is still not fixed I'll let programmers know that they've missed it.
Yes. This extra code should resolve some additional suffixes for patterns, but I think it broke the regular page class suffixes. Thank You for letting me know that this is still not fixed I'll let programmers know that they've missed it.
-

- Moderator
13 posts
• Page 1 of 1
