Forum Support

Shape 5
September 21, 2021, 11:59:41 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Custom Module Class Suffix  (Read 344 times)
sneadm
Jr. Member
**
Offline Offline

Posts: 90



« on: 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?
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #1 on: 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.
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
sneadm
Jr. Member
**
Offline Offline

Posts: 90



« Reply #2 on: 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?
Logged
sneadm
Jr. Member
**
Offline Offline

Posts: 90



« Reply #3 on: 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
Code:
<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
Logged
sneadm
Jr. Member
**
Offline Offline

Posts: 90



« Reply #4 on: April 10, 2010, 01:26:49 PM »

Never mind, it does screw up the regular suffixes now.  Still looking at it.
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #5 on: 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.
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
sneadm
Jr. Member
**
Offline Offline

Posts: 90



« Reply #6 on: 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,
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.