Sign Up for OSTraining

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Edit template html in Joomla? - HD-Custom CSS Module

Edit template html in Joomla? - HD-Custom CSS Module 10 months 1 week ago #50977

Hi again

Starting a new post since topic is veering away from last post's core-file discussion and this has to do with awesome new module you just hooked me up with. I just installed HD-Custom CSS Module in order to avoid losing my template changes in the future as well as the bonus of being able to easily create pages with different css. I have the perfect opportunity to try out this module, and on first attempt it is not working so want to follow developers instructions below:

The instructions for this module include creating a new module position called "css" that can then be used as position for these css modules instead of the existing module positions in the event that using the standard positions do not work. The developer gives the following instructions:
If you have any problems setting the module to appear in a specific module position try creating a new module position. Go to Template Manager > choose your template > Edit HTML. Then insert the following line before the closing </body> tag at the bottom of the page.
 
<div id="css"><jdoc:include type="modules" name="css" /></div>
 
Then when allocating a module position to Custom CSS module, type "css" in the module position box.
 
Alternatively if there are no inline styles to overide you could position the CSS module within the <head> tags of the HTML (instead of the body tag). To do this insert the following line in your template's index.php file before the closing </head> tag.
 
<jdoc:include type="modules" name="css" />
 
Then when allocating a module position to Custom CSS module, type "css" in the module position box. If this does not work then check that there are no inline styles within the body section that would overide your CSS instructions.

QUESTION 1: Go to Template Manager > choose your template > Edit HTML. Is there a way via Joomla's template manager to do this...to edit html? I can not find this link or button. If it does exist, please help me to find it. If not, can you tell me which file that they are referring to and I can try to add the line of code via cPanel if that won't create a problem.

QUESTION 2: Also, could help explain the rest of the above instructions including what in-line styling is [what file it would be in] and how this could override the affects of this module.

Thanks
Please become a member of OSTraining to reply to this post.

Edit template html in Joomla? - HD-Custom CSS Module 10 months 1 week ago #50980

  • WillRoz
  • WillRoz's Avatar
  • OFFLINE
  • OSTycoon
  • Posts: 305
  • Thank you received: 2
  • Karma: 0
Hey Scott,

In my now 30 minutes of playing with this extension, (thanks for the link to it, BTW), it seems that the structure of the website will ultimately determine the best way to use the extension for that website.

For example, right now, I have a client that is deciding what template they'd like to use for the site, so there are 6 or 7 templates installed ATM. I've just made a few tweaks to the css of a few of the templates using this extension. I basically used Firebug and selected the area that I wanted to change the style of, literally copied and pasted the CSS from Firebug to the text area of the extension, and changed the individual styles to suit my needs. There were some instances where I needed to use the !important operator to get the new CSS to stick, but so far everything has worked as I thought it would.

With this situation, I made a Custom CSS module for each template I have installed. I gave each new Custom CSS module a new position named "template_name_css' and used the {loadposition x} at the top of each module/article I've wanted to use it on.

I've also found it works by assigning it to a specific position that already exists in the template (a navigation position, per say).

I'm sure I'll have more to report back with after I work with it for a bit.

Thanks again for posting a link to this little gem.

Best,
Will
Will Rosner
Please become a member of OSTraining to reply to this post.

Edit template html in Joomla? - HD-Custom CSS Module 10 months 1 week ago #50982

Hi Will,
Thanks go to OST and Nick for the heads up on this module. I am a beginner with code and am stuck following the instructions above. I would like to first learn how to create a special module position that I could use to place these modules. I would like this to be my first option rather than within articles as I could keep all of these template changes together in one place and just filter by this module name and see all of my changes.. [also I need to use this now on my homepage which has no article] This was the main reason for installing this module - to keep better track of my template modifications. The bonus is the ability to modify pages independently.

I can't follow the instructions I posted above from developer, there is something missing or I just cant see where in Joomla is this Edit HTML option... and he doesn't give the file where the code should be added.

The last change I made to my site via code from template developer messed up my homepage a bit and gives me the perfect opportunity to try this module to fix it... however, each time firebug gives me the code to change i put it into this new module and nothing happens... I may be wrong here, but I thought that it wasn't critical to which module position it is assigned to as long as it is on the page you want to impact, right? I need to learn a bit more I guess

Thanks for taking the time to respond.

Regards
Scott
Please become a member of OSTraining to reply to this post.

Edit template html in Joomla? - HD-Custom CSS Module 10 months 1 week ago #51000

  • edandrea
  • edandrea's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 3106
  • Thank you received: 7
  • Karma: 0
Hi Scott,

I've put this on the list of tutorials to do. Give me some time to study it, since it's new to me, and watch the newsletter. We'll publish there as soon as it's ready. I'll try to let you know when it's ready.

Cheers,
Ed
Please become a member of OSTraining to reply to this post.
  • Page:
  • 1

Sign Up for OSTraining

Open Source Training is not affiliated with or endorsed by the Joomla, WordPress or Drupal projects.
All product names and trademarks are the property of their respective owners.

Copyright 2013 Open Source Training, LLC. All rights reserved.