Module Class Suffix doesnt work

  • Posts: 12
  • Thank you received: 0
13 years 11 months ago #2323

Hi,
I added shopping cart module to position 'left'. I set "Module Class Suffix" as "_menu". But on the front end, this setting is not 'respected'. The module is put inside with wrong css class:

<div class="module">...</div>

It should be:
<div class="module_menu">...</div>


This works fine with main menu module for example.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2325

That's interesting.

It actually works on our dev website but doesn't on our demo website. We will have to investigate...
It's actually a parameter which is handled automatically by joomla and since it was working on our dev website, we thought it would be working all the time.
I'll update that thread when we find the problem.

Last edit: 13 years 11 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2326

You can edit the file modules/mod_hikashop/mod_hikashop.php and the file modules/mod_hikashop_cart/mod_hikashop_cart.php and change in each the code

foreach($module_options as $key => $option){
	$params->set($key,$option);
}
to
foreach($module_options as $key => $option){
	if($key !='moduleclass_sfx'){
		$params->set($key,$option);
	}
}

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
13 years 11 months ago #2329

Thanks, that code fixes the problem.

Please Log in or Create an account to join the conversation.

  • Posts: 93
  • Thank you received: 5
13 years 11 months ago #2675

is it not better to use a preceeding space for module_suffix rather then '_' as the space should separate the new suffix from the old without losing formatting etc?

Ive not done much work with these as yet .


you Guys are Awesome and have excellent Support! Keep up the great Work!.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2685

If you use a space, that means that the module div will have two classes:
module new_class
But if you user an _, it will only have one class which is different from the default one:
module_new_class

Ususally, I used that option to set the suffix _menu which is defined for the menu module in order to add a chrome around the module when displayed on the left or right columns of the template. That's a standard way of doing it in joomla.

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum