Module Alternative Layout

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
User avatar
sea-horse2
Joomla! Intern
Joomla! Intern
Posts: 65
Joined: Sat Feb 16, 2013 11:45 am

Module Alternative Layout

Post by sea-horse2 » Fri Nov 27, 2015 11:59 am

for a module like 'News Show SP2' which, the template file is located '/modules/mod_news_show_sp2/tmpl/default.php' and the CSS file that I want to adjust is located '/modules/mod_news_show_sp2/assets/css/mod_news_show_sp2.css'
how can I create a 'custom layout' so my changes don't get erased on update?

User avatar
fcoulter
Joomla! Ace
Joomla! Ace
Posts: 1685
Joined: Thu Sep 13, 2007 11:39 am
Location: UK
Contact:

Re: Module Alternative Layout

Post by fcoulter » Fri Nov 27, 2015 12:08 pm

You can override the template very easily, by creating a folder inside the html folder of your site template, called mod_news_show_sp2, the copy the default.php template to it. Then you can modify that file as you wish without it being overwritten on update.

Overriding the css is more difficult, because there is not a standard way of doing this. Some templates, eg those using the warp framework, allow for a custom css file. But if the modifications that you want to make are small then actually it might be easier just to add some custom styles to your custom template file using an html <style> tag,
http://www.spiralscripts.co.uk for Joomla! extensions
http://www.fionacoulter.com/blog my personal website
Security Forum moderator :: VEL team member
"Wearing my tin foil hat with pride"

User avatar
sea-horse2
Joomla! Intern
Joomla! Intern
Posts: 65
Joined: Sat Feb 16, 2013 11:45 am

Re: Module Alternative Layout

Post by sea-horse2 » Fri Nov 27, 2015 7:14 pm

I use a Joomlashine template, and it allows to create custom css.
what I want to do is change some colors and sizes, and although I created a custom template for "News Show SP2" thanks to you, (and it shows in the module layout menu), in firebug my color changes take me to "/modules/mod_news_show_sp2/assets/css/mod_news_show_sp2.css" so what is the best way to do a e.g. " background: #red;" ?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30888
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Module Alternative Layout

Post by Per Yngve Berg » Fri Nov 27, 2015 8:24 pm

You don't need a layout override to change css.

Put the css you change into the custom.css file (or other css file) of your template.

User avatar
sea-horse2
Joomla! Intern
Joomla! Intern
Posts: 65
Joined: Sat Feb 16, 2013 11:45 am

Re: Module Alternative Layout

Post by sea-horse2 » Sat Nov 28, 2015 7:57 pm

sorry for me being very novice, but if I want to make the background red, in addition to the highlighted code in screenshot what should I put in custom.css ?
You do not have the required permissions to view the files attached to this post.

User avatar
AlexVega
Joomla! Hero
Joomla! Hero
Posts: 2711
Joined: Fri Aug 28, 2015 6:13 am
Location: México

Re: Module Alternative Layout

Post by AlexVega » Sun Nov 29, 2015 6:38 am

Hi there!

You already have the info, background, so you can add
something like:

Code: Select all

.ns2-date-blog {
  background-color: red;
}
Also you can check this info:
https://developer.mozilla.org/en-US/docs/Web/CSS

Cheers!


Locked

Return to “Extensions for Joomla! 3.x”