Best Website-BuildersBest Website-Builders
    What's Hot

    San Jose police union executive charged with attempted illegal importation of synthetic opioids – CBS San Francisco

    March 30, 2023

    Bankers convicted of helping Putin's friend

    March 30, 2023

    Jeremy Renner emotional in first interview since snowplough accident

    March 30, 2023
    Facebook Twitter Instagram
    Facebook Twitter Instagram
    Best Website-BuildersBest Website-Builders
    • Home
    • CSS

      How to use them to improve your SEO

      March 30, 2023

      ChatGPT Made Me Cry and Other Adventures in AI Land

      March 29, 2023

      Around Town – Northeast Times

      March 29, 2023

      iOS 16.4: All New Emojis for iPhone

      March 29, 2023

      Citi strengthens ASEAN team with key appointments

      March 29, 2023
    • Joomla

      An In-Depth Study of the Market Status, Trends and Top Players of the Open Source Content Management Systems Market

      March 27, 2023

      Save Thousands On Web Hosting With iBrave, Now Only $86

      March 23, 2023

      In Vitro Transcription Services Market Analysis, Research Study with Shanghai Zhishuo Biotechnology Co., Yunzhou Biotechnology Co.

      March 23, 2023

      Current state of UK content management systems

      March 23, 2023

      Reseller Hosting Business: Important Q&A

      March 21, 2023
    • PHP

      Kentucky Bans Gender Affirming Care for Transgender Youth

      March 29, 2023

      The “Mean Girl” host said she doesn’t wash her hands after using the restroom. Doctors say it’s terrible and unsafe.

      March 29, 2023

      Juno Temple and Brett Goldstein explain Roy and Keeley’s ‘heartbreaking’ breakup

      March 29, 2023

      Groom Your Beard Like a Pro: Top Rated Beard Care Products

      March 29, 2023

      FDA Approves Narcan for Over-the-Counter Use

      March 29, 2023
    • UX

      Heylol, Public Messenger App for Young Adults and Teenagers, Announces New Streak Feature

      March 30, 2023

      Netskope and Zoom work together to improve security posture and stay compliant

      March 29, 2023

      8 Key End-User Experience Monitoring Metrics for VDI

      March 29, 2023

      Navy Federal launches new initiative to continue member-focused mission

      March 29, 2023

      Two Latest Products in Q2 Will Help Financial Institutions Personalize User Experiences at Scale

      March 29, 2023
    • Web Builders
      1. Web Design
      2. View All

      What Comes First in Website Development — Design or Copy?

      February 2, 2023

      Modern Campus Honors Best Higher Education Websites of 2022

      February 2, 2023

      Premier SEO Consultant in Las Vegas, Nevada with Unparalleled Customer Service

      February 2, 2023

      Can Religious Freedom Be Saved? This group is racing the clock to teach America’s first freedom

      February 2, 2023

      How i Create New Google Account

      February 7, 2023

      CWT powers tools for meeting and event planners

      January 31, 2023

      Best Website Builder – Website Builders

      January 24, 2023

      Is There A Market For Rap-Themed Slot Games? – Rap Review

      January 19, 2023
    • WordPress

      New Microsoft Surface Hub 2S Wants Teams Calls To Be More Immersive Than Ever

      March 30, 2023

      Quordle Today – Tips and Answers for Thursday, March 30 (Game #430)

      March 30, 2023

      Calm down, ChatGPT isn’t really artificial intelligence

      March 30, 2023

      Hackers can hijack your Wi-Fi with this worrying security flaw

      March 29, 2023

      This Siri replacement may be the closest thing to using ChatGPT on your iPhone

      March 29, 2023
    • Realtoz
      • Our Other Sites
    • More News
    Best Website-BuildersBest Website-Builders
    Home » Add JavaScript or CSS tags to your Joomla headers! (per page – not site-wide).
    Joomla

    Add JavaScript or CSS tags to your Joomla headers! (per page – not site-wide).

    websitebuildersnowBy websitebuildersnowAugust 11, 2011No Comments2 Mins Read
    Facebook Twitter LinkedIn Telegram Pinterest Tumblr Reddit WhatsApp Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    First, you need a Jumi component or Sourcerer plugin for this to work. Since our main focus here is custom development outside of standard modules or articles within Joomla, we need one of these.

    Here you can find Jumi… my favorite extension for Joomla other than Breezing Forms.

    http://extensions.joomla.org/extensions/edition/custom-code-in-content/1023?qh=YToxOntpOjA7czo0OiJqdW1pIjt9

    ~My little ad for Jumi~

    *Jumi is a component that allows you to create custom php and js pages and load them into your Joomla site. So if you need to add AJAX or interactivity to your website, Jumi is the perfect component. Jumi is compatible with J1.0, J1.5 and J1.6. Jumi allows you to add custom content to modules, articles, and more.

    New to Jumi? You can find these helpful tutorials at http://edo.webmaster.am/jumi/tutorial.

    ~Now back to the main topic~

    If you’ve custom coded your page and need to add a bit of JavaScript or CSS to it, you’ll usually want to put those links in the template’s index.php page. , but now these scripts and css are applied site-wide and can mess up your template’s scripts and css on all pages. Is there a way I can add these scripts and css pages without manually adding them to the index.php page and not affect the site wide scripts and css.

    Plug this at the top of your customized php page and you will get the desired result only on the page where you add this code.

    <?php
                          $document =& JFactory::getDocument();
                          $document->addStyleSheet('files/css/default.css');
                          $document->addScript('files/scripts/test.js');
                          ?>
                          

    opens in new window

    This will add the script and css files to the tag for that particular page. You can then freely change that page without worrying about ruining your entire site.

    If you run into any issues, please refer to these two Joomla articles that provide further assistance.

    http://docs.joomla.org/Adding_JavaScript

    http://docs.joomla.org/Adding_JavaScript_and_CSS_to_the_page



    Source link

    Share this:

    • Tweet
    • Email
    • Pocket
    • Mastodon
    • WhatsApp
    • Telegram
    • Share on Tumblr
    • Print
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram Email
    Previous ArticleWeb Development for Android Devices: Mobile Joomla!
    Next Article RapidSwitch supports the world’s first Joomla!™ dedicated server environment.
    websitebuildersnow
    • Website

    Related Posts

    An In-Depth Study of the Market Status, Trends and Top Players of the Open Source Content Management Systems Market

    March 27, 2023

    Save Thousands On Web Hosting With iBrave, Now Only $86

    March 23, 2023

    In Vitro Transcription Services Market Analysis, Research Study with Shanghai Zhishuo Biotechnology Co., Yunzhou Biotechnology Co.

    March 23, 2023
    Add A Comment

    Leave a Reply Cancel reply

    Top Posts

    Subscribe to Updates

    Get the latest sports news from SportsSite about soccer, football and tennis.

    Advertisement
    Demo

    This website provides information about CSS and other things. Keep Supporting Us With the Latest News and we Will Provide the Best Of Our To Makes You Updated All Around The World News. Keep Sporting US.

    Facebook Twitter Instagram Pinterest YouTube
    Top Insights

    San Jose police union executive charged with attempted illegal importation of synthetic opioids – CBS San Francisco

    March 30, 2023

    Bankers convicted of helping Putin's friend

    March 30, 2023

    Jeremy Renner emotional in first interview since snowplough accident

    March 30, 2023
    Get Informed

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    © 2023 bestwebsite-builders. Designed by bestwebsite-builders.
    • Home
    • About us
    • Contact us
    • DMCA
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.