The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Thu Mar 01, 2012 3:59 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sat Aug 25, 2007 8:13 am
Posts: 140
Location: Taiwan
Hi,

I was trying to output as none in my template using Joomla 2.5:

Code:
<h1 class="logo"><a href="#">#####</a></h1></div>


But everytime it was wrapped in a class="custom":

Code:
<div class="custom">
   <h1 class="logo"><a href="http://localhost/taisen/">Taisen Cast Iron Foundry</a></h1></div>
    </div>


Even when using style="none":
Code:
<jdoc:include type="modules" name="logo" style="none" />


The solution is to ensure that you copy:
mod_custom from the html folder in the atomic template.

Best Regards,

Robert Stark

_________________
Web Design | Graphic Design | Taiwan
http://www.iamrobert.com


Top
 Profile  
 
PostPosted: Wed Jun 06, 2012 3:49 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Oct 17, 2010 2:02 am
Posts: 21
Hi Robert,

You can go to /modules/mod_custom/tmpl/default.php, and delete div things in it.

Reference: http://www.joomlaportal.de/joomla-2-5-j ... ellen.html

Cheers,
Mcwolf


Top
 Profile  
 
PostPosted: Mon Jun 18, 2012 10:09 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sun Nov 27, 2005 11:27 am
Posts: 129
No way to do this without changing the core files?
Why the "none" style isn't working in Joomla 2.5, is it a bug?

_________________
http://www.elearnit.net
http://www.promonline.biz


Top
 Profile  
 
PostPosted: Mon Jul 16, 2012 10:20 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Oct 07, 2011 9:14 am
Posts: 4
A way to remove the custom class without making adjustments in the core files, is to make an alternative layout/template override.
1) create a map called mod_custom in the HTML map of your template
2) go to the modules/mod_custom/tmpl and copy the the default.php file and paste it in the html/mod_custom/ .
3) if you wish you can rename the default.php file in html/mod_custom/ , if you don't rename this file then all excisting Custom HTML modules will use the new default.
4) Open default.php file in html/mod_custom/ and remove the custom class definition, so the code becomes
Code:
<div  class="<?php echo $moduleclass_sfx ?>" <?php if ($params->get('backgroundimage')): ?> style="background-image:url(<?php echo $params->get('backgroundimage');?>)"<?php endif;?> >

5) if you have choosen to rename the default.php file, go to your Custom HTML module, Advanced Options and change the layout at the Alternative Layout option.


Top
 Profile  
 
PostPosted: Tue Aug 14, 2012 10:05 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Wed Jun 02, 2010 12:16 pm
Posts: 469
An simpler option would be to just create an override for all modules;

/your-template/html/modules.php

You can include / exclude whatever you like then.

_________________
Top-tip: marking your posts as "Urgent!", when they clearly aren't, will most likely get you ignored.

Please don't PM me with anything other than *Personal Messages*! If you have a Joomla question, post it in the forum.


Top
 Profile  
 
PostPosted: Thu Oct 04, 2012 3:10 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Oct 01, 2012 10:45 pm
Posts: 2
ThinWhite wrote:
A way to remove the custom class without making adjustments in the core files, is to make an alternative layout/template override.
1) create a map called mod_custom in the HTML map of your template
2) go to the modules/mod_custom/tmpl and copy the the default.php file and paste it in the html/mod_custom/ .
3) if you wish you can rename the default.php file in html/mod_custom/ , if you don't rename this file then all excisting Custom HTML modules will use the new default.
4) Open default.php file in html/mod_custom/ and remove the custom class definition, so the code becomes
Code:
<div  class="<?php echo $moduleclass_sfx ?>" <?php if ($params->get('backgroundimage')): ?> style="background-image:url(<?php echo $params->get('backgroundimage');?>)"<?php endif;?> >

5) if you have choosen to rename the default.php file, go to your Custom HTML module, Advanced Options and change the layout at the Alternative Layout option.


How do you create a map called mod_custom in the HTML map of your template? Thanks.
Koniq


Last edited by koniqs2016 on Thu Oct 04, 2012 3:26 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Oct 04, 2012 3:18 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Wed Jun 02, 2010 12:16 pm
Posts: 469
Hi Koniq,

You would need to do that on your server, using FTP or SSH. There are some extensions that can allow you to do that from within Joomla, like NinjaXplorer or Extplorer, but its easier to just do it via FTP.

_________________
Top-tip: marking your posts as "Urgent!", when they clearly aren't, will most likely get you ignored.

Please don't PM me with anything other than *Personal Messages*! If you have a Joomla question, post it in the forum.


Top
 Profile  
 
PostPosted: Thu Oct 04, 2012 3:43 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Oct 01, 2012 10:45 pm
Posts: 2
float-right wrote:
Hi Koniq,

You would need to do that on your server, using FTP or SSH. There are some extensions that can allow you to do that from within Joomla, like NinjaXplorer or Extplorer, but its easier to just do it via FTP.


Thanks for getting back to me so quick. Basically I have just converted a static html template into a joomla 2.5 template and in order to put a logo image in to a div in the header, I made a custom html module in joomla backend and inserted an image therein. I am now experiencing problems trying to remove all padding size around the image. ie.

<div class="custom">
<p style="margin: 0px;"><img border="0" alt="" src="/joomla/images/logo.gif"></p></div>

I put the following style in the html module in joomla for the image, (style="margin: 0px;) as you can see above but it is doing little in terms of giving me the control I need.

I am testing the whole thing on localhost at the moment and dont need ftp ... etc

To float Right: Do I create an html folder within my template directory and add that to my templatedetails.xml and proceed with the instructions to copy the default.php etc ? Also What is the actual process of creating a map mean, what do I do? "create a map called mod_custom in the HTML map of your template" This where I am stuck if anyone understands what I mean.

Thanks in advance


Top
 Profile  
 
PostPosted: Mon Oct 22, 2012 3:42 pm 
Joomla! Intern
Joomla! Intern

Joined: Mon Feb 04, 2008 10:43 pm
Posts: 66
Go into your templates folder -> html -> Create a folder called mod_custom.

Then go into your sites root -> modules -> mod_custom -> tmpl folder and copy the file default.php and index.html. Paste the two files into your templates folder -> html -> mod_custom folder.

Then open the file default.php in your templates folder -> html -> mod_custom and edit it as needed.

If you open the file you will see it contains the following html:

Code:
<div class="custom<?php echo $moduleclass_sfx ?>" <?php if ($params->get('backgroundimage')): ?> style="background-image:url(<?php echo $params->get('backgroundimage');?>)"<?php endif;?> >
   <?php echo $module->content;?>
</div>


Change it as you need.


Top
 Profile  
 
PostPosted: Tue Nov 27, 2012 9:57 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Dec 22, 2010 12:00 pm
Posts: 158
create a file : templates/YOUR_TEMPLATE/html/mod_custom/default.php

Code:
<?php
defined('_JEXEC') or die;
if($moduleclass_sfx){   
   echo '<div class="'.$moduleclass_sfx.'">' . $module->content . '</div>';   
}
else{
   echo $module->content;
}
?>


Top
 Profile  
 
PostPosted: Fri Feb 22, 2013 11:14 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 26, 2011 5:02 pm
Posts: 6
Location: Budapest, Hungary
polpaulin wrote:
create a file : templates/YOUR_TEMPLATE/html/mod_custom/default.php

Code:
<?php
defined('_JEXEC') or die;
if($moduleclass_sfx){   
   echo '<div class="'.$moduleclass_sfx.'">' . $module->content . '</div>';   
}
else{
   echo $module->content;
}
?>


Tnk, you saved my day. This custom classed div smashed the layout in FF, but was good in Chrome. Now I have the chance to make clean work. :)


Top
 Profile  
 
PostPosted: Fri Feb 22, 2013 7:55 pm 
Joomla! Master
Joomla! Master
Online

Joined: Mon Oct 27, 2008 9:27 pm
Posts: 13613
Location: Akershus, Norway
http://docs.joomla.org/Applying_custom_module_chrome
http://docs.joomla.org/Customising_the_way_modules_are_displayed


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group