: Custom Module Class Suffix : sneadm April 09, 2010, 02:19:06 PM I would like to give a module a class suffix other than the ones used by the template so that I can apply my own custom css to it. It seems that the template is stripping out the suffix if it's not one of the ones that it uses (ie. -red, -blue etc.)
Am I missing something or is there a way to pass through my own suffix to the module division? : Re: Custom Module Class Suffix : mikek April 10, 2010, 10:50:41 AM Hello, the template wouldn't strip the suffix if it's one that doesn't exist in the css. It takes a good knowledge of css to know how to make suffixes but the best way I can explain is it to do a search in template.css for -red and make copies of this section and edit it with your new suffix and pictures.
: Re: Custom Module Class Suffix : sneadm April 10, 2010, 11:48:06 AM OK, some more details. When I put my module in position top2-5 or bottom_row_1-4, it works fine, whether it was previously defined in the css or not. When I put the module in any of the 'middle' positions, where the class comes out to be "module_round_box_middle", my suffix is not appended to it. There seems to be something in the processing for these modules that takes the suffix, like -red and applies it to the h3 tag and to the span tag within that if you give it dynamic content. I tested this with my suffix and it does go through but again only on the h3 and span tags, I would like it to append to the div tag for the module. I would expect it to be 'div class="module_round_box_middle-mysuffix". Is this possible or is it a feature of the dynamic module titles code?
: Re: Custom Module Class Suffix : sneadm April 10, 2010, 01:10:15 PM I think I've found a fix. In templates/basics/html/module.php, I change line 122 to read
: <div class="module_round_box_middle<?php echo $s5_suffix_beginning ?>"> This gives me the result I was after. Please let me know if this is likely to screw up anything else.Thanks : Re: Custom Module Class Suffix : sneadm April 10, 2010, 01:26:49 PM Never mind, it does screw up the regular suffixes now. Still looking at it.
: Re: Custom Module Class Suffix : mikek April 12, 2010, 07:35:54 AM Hello, you shouldn't be editing modules.php to create a custom class. This file create it's own module layouts, not styles. There are different layouts used in different areas of the site.
: Re: Custom Module Class Suffix : sneadm April 12, 2010, 10:06:42 AM Yes, I see that. I'm thinking I'll have to create my own position and either use one of the other styles in the template or create a new one.
Thanks, |