Joomla Module Class Suffix

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
14 years 1 day ago #4044

I cannot see the Joomla Module Class Suffix in the HTML source.

It would be useful if the templates handled this so that if a suffix is specified instead of generating something like:

<div id="hikashop_category_information_menu_172" class="hikashop_category_information">

when a suffix was defined it generated

<div id="hikashop_category_information_menu_172" class="hikashop_category_information hikashop_category_informationTHEJOOMLASUFFIX">

This would improve CSS coding flexibility.

I initially looked at the Hikashop module admin screen thinking that would be a good place to have a suffix entry field, but then having 2 places for entering suffixes would be more confusing.

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
14 years 1 day ago #4046

The HTML you copy/pasted is for a hikashop menu, not a module. Module class suffixes are for module.
You can actually edit the module class suffix in the joomla options of the modules.
That's an option which is used by joomla to add a chrome around the module.

Usually, people add the suffix "_menu" for that in that field.

It's not meant to be used inside the module content.

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

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
14 years 1 day ago #4050

The module is one of the 'Category Module Listings' in the 'Display / Content Modules' admin screen.

This module appears in the 'component' section of the Joomla template.

The corresponding Joomla module is unpublished (otherwise get 2 sets of product information displayed).
However, if I do publish it I still do not see the 'Module Class Suffix' in the HTML.

This might be a Joomla 1.6 related issue.
In Joomla 1.5 if I publish the module I see the 'Module Class Suffix'.

It would be good to see a usable 'Class Suffix' field definable in either 'Display / Content Modules' or 'Joomla Module Manager' - maybe even at the category / product levels.

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
14 years 1 day ago #4051

This option is not used a lot and it totally handled by joomla. We just define it in the xml of the module. Which is why we decided to not display it in the hikashop interface. There are already plenty of options there.

So it's probably an issue with joomla 1.6. We'll look at it.

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
14 years 1 day ago #4052

I just tried on joomla 1.6

I properly got the option for the modules in the joomla options. I also properly got the suffix in the class name of the module. It seems to be working properly for me.

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

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
14 years 1 day ago #4057

Maybe we are looking in different places here.

Back tracking in the call stack from the template led me to mod_hikashop.php.
I did not spot anywhere obvious where you use 'moduleclass_sfx'.

Screenshots of 2 example call stacks, unmodified html and a change suggestion for mod_hikashop.php attached.

I notice that 'moduleclass_sfx' is available within templates, so I could use it there.

File Attachment:

File Name: screenshots.zip
File Size:75 KB

Attachments:

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
14 years 1 day ago #4058

I understand what you're talking about.

You're saying that the module class suffix is not set in the html of modules which are displayed in the component instead of being displayed directly in a position of the template. And that's normal.

The chrome html divs around modules are added by joomla. They are added based on the style attribute in templates :
<jdoc:include type="module" name="test" style="rounded" />

The possible values are rounded, table, horz, xhtml, plus any style defined in the template it self.
In the hikashop component, the style used is "none" which doesn't add any chrome around the modules. And thus, you don't see the module class suffix. That's by the way the same in joomla 1.5 and 1.6

If you want to change that, you can edit the files show and listing of the views product, and the file listing of the view category (via the menu Display->Views of HikaShop).
Near the bottom of those files you will find the line:

echo JModuleHelper::renderModule($module);
which you can replace with:
echo JModuleHelper::renderModule($module,array('style'=>'xhtml'));
for example to use the style xhtml of your template for the chrome of the modules displayed there. Then, joomla will automatically add the chrome, with the class suffix in it.

Last edit: 13 years 11 months ago by nicolas.

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

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
14 years 1 day ago #4062

Thanks.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum