1

I want to add to footer from this code

<?xml version="1.0"?>
 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    layout="empty"   xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<head> 
        <link src="Ntuc_Quote::css/trastyle.css"/>
        <link src="Ntuc_Quote::js/getQuoteTravel.js"/>
    <link src="Ntuc_Quote::js/scripts.js"/>
        <link src="Ntuc_Quote::js/form_elements.js"/>


</head>
 <body>
    <attribute name="class" value="travel"/>
    <referenceContainer name="content">
        <block class="Ntuc\Quote\Block\Quote\Index" name="quote_travel" template="quote/travel.phtml" cacheable="false"></block>
    </referenceContainer>
</body>

Please help me.

  • For all pages u want to add this code? If yes then use Widget & Block it will do – Ankit Shah Feb 10 '17 at 1:32
  • In Magento 2 they utilize the Require JS system which moves the JS development away from having your JS dependencies loaded by you. Instead Require will load your dependencies when they are declared on the page. Magento goes into more detail here: devdocs.magento.com/guides/v2.0/javascript-dev-guide/javascript/…. But for this reason, i don't think there is a built in way to load these in the footer using the XML system – circlesix Feb 10 '17 at 3:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.