How to add an external javascript or css file to magento?
Answer / Lakhpat Ram
To include an external JavaScript or CSS file in Magento, you can use the following methods:n1. Using layout XML files: Add a reference to the script/stylesheet in the appropriate layout handle. For example, for CSS files, add it inside `<head>` tags within your theme's `local.xml` or `page_html.xml`. For JavaScript files, use `<action method="insertPhtmlBeforeBodyEnd">`.n2. Directly in your pHTML file: Add the script tag to your custom pHTML file.nFor example for CSS:n```n<link rel="stylesheet" type="text/css" href="your_url.css">n```nFor JavaScript:n```n<script src="your_url.js"></script>n```
| Is This Answer Correct ? | 0 Yes | 0 No |
How many types of sessions are there in magento?
How do you add a blog to magento?
Explain the installation process of magento 2.2 manually?
How we can add a custom payment method only enable for admin section in magento?
How to run custom query in magento?
what all billing information can be managed through Magento?
How to add an accepted payment banner at the footer?
Which billing information can be managed through magento?
What type of web applications are created in magento.
Explain magento’s compilation feature?
Which php mvc framework, magento is based on?
What is page layout section?