Magento2 : How to add custom link in footer inside newsletter block?how to change newsletter footer text?how...

Difference between 'stomach' and 'uterus'

What could be a means to defeat a childrens’ nightmare?

I can't die. Who am I?

Can I cast a spell through the Invoke Duplicity clone while inside a Forcecage?

Inconsistent behaviour between dict.values() and dict.keys() equality in Python 3.x and Python 2.7

How to roleplay my character's ethics according to the DM when I don't understand those ethics?

Lock enemy's y-axis when using Vector3.MoveTowards to follow the player

Was it really inappropriate to write a pull request for the company I interviewed with?

Is there a frame of reference in which I was born before I was conceived?

Can an earth elemental drown/bury its opponent underground using earth glide?

Correct physics behind the colors on CD (compact disc)?

Why are special aircraft used for the carriers in the United States Navy?

What is better: yes / no radio, or simple checkbox?

How do I deal with being envious of my own players?

Are there other characters in the Star Wars universe who had damaged bodies and needed to wear an outfit like Darth Vader?

Why won't the strings command stop?

1970s scifi/horror novel where protagonist is used by a crablike creature to feed its larvae, goes mad, and is defeated by retraumatising him

Plagiarism of code by other PhD student

If nine coins are tossed, what is the probability that the number of heads is even?

Misplaced tyre lever - alternatives?

Is every open circuit a capacitor?

Rationale to prefer local variables over instance variables?

When was drinking water recognized as crucial in marathon running?

Must 40/100G uplink ports on a 10G switch be connected to another switch?



Magento2 : How to add custom link in footer inside newsletter block?


how to change newsletter footer text?how to move newsletter block from footer to left in magentoEmail newsletter not working on homepage footerMagento2 - How to add a block to footerHow to add Page URL link in footer magento2How to add a second static link block in footer (Magento2)?Open footer block link in new tab/windowHow to add footer link in magento2Move newsletter block before footer start, Luma, magento 2How to add custom block link to email template and link hit from email to specific page?













1















To add custom link in newsletter block magento 2 ??enter image description here










share|improve this question





























    1















    To add custom link in newsletter block magento 2 ??enter image description here










    share|improve this question



























      1












      1








      1








      To add custom link in newsletter block magento 2 ??enter image description here










      share|improve this question
















      To add custom link in newsletter block magento 2 ??enter image description here







      magento2 footer






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited yesterday









      Amit Naraniwal

      68639




      68639










      asked yesterday









      GomathiGomathi

      637




      637






















          4 Answers
          4






          active

          oldest

          votes


















          1














          For add custom link in footer inside newsletter block.You Need to override these file in your custom theme




          vendor/magento/module-newsletter/view/frontend/templates/subscribe.phtml.




          like this one




          app/design/frontend/Magento/project/Magento_Newsletter/templates/subscribe.phtml




          <?php
          /**
          * Copyright © Magento, Inc. All rights reserved.
          * See COPYING.txt for license details.
          */

          // @codingStandardsIgnoreFile

          /** @var MagentoNewsletterBlockSubscribe $block */

          ?>
          <div class="block newsletter">
          <div class="title">
          <strong>
          <?= $block->escapeHtml(__('Newsletter')) ?>
          </strong>
          </div>
          <div class="content">
          <form class="form subscribe"
          novalidate
          action="<?= $block->escapeUrl($block->getFormActionUrl()) ?>"
          method="post"
          data-mage-init='{"validation": {"errorClass": "mage-error"}}'
          id="newsletter-validate-detail">
          <div class="field newsletter">
          <a href ="link">link</a>
          <label class="label" for="newsletter"><span><?= $block->escapeHtml(__('Sign Up for sneak peaks and sales!')) ?></span></label>
          <div class="control">
          <input name="email" type="email" id="newsletter"
          placeholder="<?= $block->escapeHtmlAttr(__('Enter your email')) ?>"
          data-validate="{required:true, 'validate-email':true}"/>
          </div>
          </div>
          <div class="actions">
          <button id="subscribe-button-click" class="action subscribe primary" title="<?= $block->escapeHtmlAttr(__('Subscribe')) ?>" type="submit">
          <span><?= $block->escapeHtml(__('Subscribe')) ?></span>
          </button>
          </div>
          </form>
          </div>
          </div>


          You Add Link Whenever you want in subscribe block as per your html. i have add a link before the newsletter block.PLease check and let me know in case of any issue.






          share|improve this answer

































            1














            you can override below file in your theme and update footer container also add custom link



                <?xml version="1.0"?> 
            <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body>
            <referenceContainer name="footer">
            <referenceBlock name="form.subscribe">
            <block class="vendormoduleBlockNavigationCustomer" after="-" name="vendor_accountr_footer" template="footer/custom.phtml"/>
            <block class="MagentoFrameworkViewElementHtmlLink" name="custom-link">
            <arguments>
            <argument name="label" xsi:type="string">Custom Link</argument>
            <!-- This will be displayed as the label of the link -->
            <argument name="path" xsi:type="string">path/to/page</argument>
            <!-- here give the path where the link redirect to -->
            </arguments>
            </block>
            </referenceBlock>
            </referenceContainer>
            </body>
            </page>





            share|improve this answer


























            • <?xml version="1.0"?> <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="footer"> <referenceBlock name="form.subscribe"> <block class="vendormoduleBlockNavigationCustomer" after="-" name="vendor_accountr_footer" template="footer/custom.phtml"/> </referenceBlock> </referenceContainer> </body> </page>

              – Gomathi
              yesterday











            • i want to add link inside newsletter block in app/code itself

              – Gomathi
              yesterday











            • i have added first code this code worked code

              – Rakesh Donga
              yesterday











            • Let me know if you have any confusion for implementation.

              – Rakesh Donga
              yesterday











            • actually i dnt want to override template through design , just from code itself i need to add link inside newsletter block

              – Gomathi
              yesterday



















            0














            In order to call links and custom block in footer in magento 2.



            So, the file which is used to define configurations of footer is default.xml. This file will be located under app/code/Namespace/Module/view/frontend/layout/. This file calls on every page, that’s why we write code for footer in this file.



            Below code is used to call custom links in footer :



            <referenceBlock name="footer_links">
            <block class="MagentoFrameworkViewElementHtmlLink" name="custom-link">
            <arguments>
            <argument name="label" xsi:type="string">Custom Link</argument>
            <!-- This will be displayed as the label of the link -->
            <argument name="path" xsi:type="string">path/to/page</argument>
            <!-- here give the path where the link redirect to -->
            </arguments>
            </block>
            </referenceBlock>


            Now If you want to add your own custom block and template inside the footer,
            then below code will be used :



            <referenceContainer name="footer-container">
            <block class="MagentoThemeBlockHtmlFooter" name="custom_block" as="custom_block" template="custom.phtml"/>
            </referenceContainer>





            share|improve this answer































              0














              Copy subscribe.phtml file form



              vendor/magento/module-newsletter/view/frontend/templates/


              and paste to you custom theme at following location



              app/design/frontend/<vendor name>/<theme name>/Magento_Newsletter/templates/



              Now add custom link to subscribe.phtml file



              I hope this will help you






              share|improve this answer























                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "479"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f264485%2fmagento2-how-to-add-custom-link-in-footer-inside-newsletter-block%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                1














                For add custom link in footer inside newsletter block.You Need to override these file in your custom theme




                vendor/magento/module-newsletter/view/frontend/templates/subscribe.phtml.




                like this one




                app/design/frontend/Magento/project/Magento_Newsletter/templates/subscribe.phtml




                <?php
                /**
                * Copyright © Magento, Inc. All rights reserved.
                * See COPYING.txt for license details.
                */

                // @codingStandardsIgnoreFile

                /** @var MagentoNewsletterBlockSubscribe $block */

                ?>
                <div class="block newsletter">
                <div class="title">
                <strong>
                <?= $block->escapeHtml(__('Newsletter')) ?>
                </strong>
                </div>
                <div class="content">
                <form class="form subscribe"
                novalidate
                action="<?= $block->escapeUrl($block->getFormActionUrl()) ?>"
                method="post"
                data-mage-init='{"validation": {"errorClass": "mage-error"}}'
                id="newsletter-validate-detail">
                <div class="field newsletter">
                <a href ="link">link</a>
                <label class="label" for="newsletter"><span><?= $block->escapeHtml(__('Sign Up for sneak peaks and sales!')) ?></span></label>
                <div class="control">
                <input name="email" type="email" id="newsletter"
                placeholder="<?= $block->escapeHtmlAttr(__('Enter your email')) ?>"
                data-validate="{required:true, 'validate-email':true}"/>
                </div>
                </div>
                <div class="actions">
                <button id="subscribe-button-click" class="action subscribe primary" title="<?= $block->escapeHtmlAttr(__('Subscribe')) ?>" type="submit">
                <span><?= $block->escapeHtml(__('Subscribe')) ?></span>
                </button>
                </div>
                </form>
                </div>
                </div>


                You Add Link Whenever you want in subscribe block as per your html. i have add a link before the newsletter block.PLease check and let me know in case of any issue.






                share|improve this answer






























                  1














                  For add custom link in footer inside newsletter block.You Need to override these file in your custom theme




                  vendor/magento/module-newsletter/view/frontend/templates/subscribe.phtml.




                  like this one




                  app/design/frontend/Magento/project/Magento_Newsletter/templates/subscribe.phtml




                  <?php
                  /**
                  * Copyright © Magento, Inc. All rights reserved.
                  * See COPYING.txt for license details.
                  */

                  // @codingStandardsIgnoreFile

                  /** @var MagentoNewsletterBlockSubscribe $block */

                  ?>
                  <div class="block newsletter">
                  <div class="title">
                  <strong>
                  <?= $block->escapeHtml(__('Newsletter')) ?>
                  </strong>
                  </div>
                  <div class="content">
                  <form class="form subscribe"
                  novalidate
                  action="<?= $block->escapeUrl($block->getFormActionUrl()) ?>"
                  method="post"
                  data-mage-init='{"validation": {"errorClass": "mage-error"}}'
                  id="newsletter-validate-detail">
                  <div class="field newsletter">
                  <a href ="link">link</a>
                  <label class="label" for="newsletter"><span><?= $block->escapeHtml(__('Sign Up for sneak peaks and sales!')) ?></span></label>
                  <div class="control">
                  <input name="email" type="email" id="newsletter"
                  placeholder="<?= $block->escapeHtmlAttr(__('Enter your email')) ?>"
                  data-validate="{required:true, 'validate-email':true}"/>
                  </div>
                  </div>
                  <div class="actions">
                  <button id="subscribe-button-click" class="action subscribe primary" title="<?= $block->escapeHtmlAttr(__('Subscribe')) ?>" type="submit">
                  <span><?= $block->escapeHtml(__('Subscribe')) ?></span>
                  </button>
                  </div>
                  </form>
                  </div>
                  </div>


                  You Add Link Whenever you want in subscribe block as per your html. i have add a link before the newsletter block.PLease check and let me know in case of any issue.






                  share|improve this answer




























                    1












                    1








                    1







                    For add custom link in footer inside newsletter block.You Need to override these file in your custom theme




                    vendor/magento/module-newsletter/view/frontend/templates/subscribe.phtml.




                    like this one




                    app/design/frontend/Magento/project/Magento_Newsletter/templates/subscribe.phtml




                    <?php
                    /**
                    * Copyright © Magento, Inc. All rights reserved.
                    * See COPYING.txt for license details.
                    */

                    // @codingStandardsIgnoreFile

                    /** @var MagentoNewsletterBlockSubscribe $block */

                    ?>
                    <div class="block newsletter">
                    <div class="title">
                    <strong>
                    <?= $block->escapeHtml(__('Newsletter')) ?>
                    </strong>
                    </div>
                    <div class="content">
                    <form class="form subscribe"
                    novalidate
                    action="<?= $block->escapeUrl($block->getFormActionUrl()) ?>"
                    method="post"
                    data-mage-init='{"validation": {"errorClass": "mage-error"}}'
                    id="newsletter-validate-detail">
                    <div class="field newsletter">
                    <a href ="link">link</a>
                    <label class="label" for="newsletter"><span><?= $block->escapeHtml(__('Sign Up for sneak peaks and sales!')) ?></span></label>
                    <div class="control">
                    <input name="email" type="email" id="newsletter"
                    placeholder="<?= $block->escapeHtmlAttr(__('Enter your email')) ?>"
                    data-validate="{required:true, 'validate-email':true}"/>
                    </div>
                    </div>
                    <div class="actions">
                    <button id="subscribe-button-click" class="action subscribe primary" title="<?= $block->escapeHtmlAttr(__('Subscribe')) ?>" type="submit">
                    <span><?= $block->escapeHtml(__('Subscribe')) ?></span>
                    </button>
                    </div>
                    </form>
                    </div>
                    </div>


                    You Add Link Whenever you want in subscribe block as per your html. i have add a link before the newsletter block.PLease check and let me know in case of any issue.






                    share|improve this answer















                    For add custom link in footer inside newsletter block.You Need to override these file in your custom theme




                    vendor/magento/module-newsletter/view/frontend/templates/subscribe.phtml.




                    like this one




                    app/design/frontend/Magento/project/Magento_Newsletter/templates/subscribe.phtml




                    <?php
                    /**
                    * Copyright © Magento, Inc. All rights reserved.
                    * See COPYING.txt for license details.
                    */

                    // @codingStandardsIgnoreFile

                    /** @var MagentoNewsletterBlockSubscribe $block */

                    ?>
                    <div class="block newsletter">
                    <div class="title">
                    <strong>
                    <?= $block->escapeHtml(__('Newsletter')) ?>
                    </strong>
                    </div>
                    <div class="content">
                    <form class="form subscribe"
                    novalidate
                    action="<?= $block->escapeUrl($block->getFormActionUrl()) ?>"
                    method="post"
                    data-mage-init='{"validation": {"errorClass": "mage-error"}}'
                    id="newsletter-validate-detail">
                    <div class="field newsletter">
                    <a href ="link">link</a>
                    <label class="label" for="newsletter"><span><?= $block->escapeHtml(__('Sign Up for sneak peaks and sales!')) ?></span></label>
                    <div class="control">
                    <input name="email" type="email" id="newsletter"
                    placeholder="<?= $block->escapeHtmlAttr(__('Enter your email')) ?>"
                    data-validate="{required:true, 'validate-email':true}"/>
                    </div>
                    </div>
                    <div class="actions">
                    <button id="subscribe-button-click" class="action subscribe primary" title="<?= $block->escapeHtmlAttr(__('Subscribe')) ?>" type="submit">
                    <span><?= $block->escapeHtml(__('Subscribe')) ?></span>
                    </button>
                    </div>
                    </form>
                    </div>
                    </div>


                    You Add Link Whenever you want in subscribe block as per your html. i have add a link before the newsletter block.PLease check and let me know in case of any issue.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited yesterday

























                    answered yesterday









                    Magento_BhurioMagento_Bhurio

                    957




                    957

























                        1














                        you can override below file in your theme and update footer container also add custom link



                            <?xml version="1.0"?> 
                        <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body>
                        <referenceContainer name="footer">
                        <referenceBlock name="form.subscribe">
                        <block class="vendormoduleBlockNavigationCustomer" after="-" name="vendor_accountr_footer" template="footer/custom.phtml"/>
                        <block class="MagentoFrameworkViewElementHtmlLink" name="custom-link">
                        <arguments>
                        <argument name="label" xsi:type="string">Custom Link</argument>
                        <!-- This will be displayed as the label of the link -->
                        <argument name="path" xsi:type="string">path/to/page</argument>
                        <!-- here give the path where the link redirect to -->
                        </arguments>
                        </block>
                        </referenceBlock>
                        </referenceContainer>
                        </body>
                        </page>





                        share|improve this answer


























                        • <?xml version="1.0"?> <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="footer"> <referenceBlock name="form.subscribe"> <block class="vendormoduleBlockNavigationCustomer" after="-" name="vendor_accountr_footer" template="footer/custom.phtml"/> </referenceBlock> </referenceContainer> </body> </page>

                          – Gomathi
                          yesterday











                        • i want to add link inside newsletter block in app/code itself

                          – Gomathi
                          yesterday











                        • i have added first code this code worked code

                          – Rakesh Donga
                          yesterday











                        • Let me know if you have any confusion for implementation.

                          – Rakesh Donga
                          yesterday











                        • actually i dnt want to override template through design , just from code itself i need to add link inside newsletter block

                          – Gomathi
                          yesterday
















                        1














                        you can override below file in your theme and update footer container also add custom link



                            <?xml version="1.0"?> 
                        <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body>
                        <referenceContainer name="footer">
                        <referenceBlock name="form.subscribe">
                        <block class="vendormoduleBlockNavigationCustomer" after="-" name="vendor_accountr_footer" template="footer/custom.phtml"/>
                        <block class="MagentoFrameworkViewElementHtmlLink" name="custom-link">
                        <arguments>
                        <argument name="label" xsi:type="string">Custom Link</argument>
                        <!-- This will be displayed as the label of the link -->
                        <argument name="path" xsi:type="string">path/to/page</argument>
                        <!-- here give the path where the link redirect to -->
                        </arguments>
                        </block>
                        </referenceBlock>
                        </referenceContainer>
                        </body>
                        </page>





                        share|improve this answer


























                        • <?xml version="1.0"?> <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="footer"> <referenceBlock name="form.subscribe"> <block class="vendormoduleBlockNavigationCustomer" after="-" name="vendor_accountr_footer" template="footer/custom.phtml"/> </referenceBlock> </referenceContainer> </body> </page>

                          – Gomathi
                          yesterday











                        • i want to add link inside newsletter block in app/code itself

                          – Gomathi
                          yesterday











                        • i have added first code this code worked code

                          – Rakesh Donga
                          yesterday











                        • Let me know if you have any confusion for implementation.

                          – Rakesh Donga
                          yesterday











                        • actually i dnt want to override template through design , just from code itself i need to add link inside newsletter block

                          – Gomathi
                          yesterday














                        1












                        1








                        1







                        you can override below file in your theme and update footer container also add custom link



                            <?xml version="1.0"?> 
                        <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body>
                        <referenceContainer name="footer">
                        <referenceBlock name="form.subscribe">
                        <block class="vendormoduleBlockNavigationCustomer" after="-" name="vendor_accountr_footer" template="footer/custom.phtml"/>
                        <block class="MagentoFrameworkViewElementHtmlLink" name="custom-link">
                        <arguments>
                        <argument name="label" xsi:type="string">Custom Link</argument>
                        <!-- This will be displayed as the label of the link -->
                        <argument name="path" xsi:type="string">path/to/page</argument>
                        <!-- here give the path where the link redirect to -->
                        </arguments>
                        </block>
                        </referenceBlock>
                        </referenceContainer>
                        </body>
                        </page>





                        share|improve this answer















                        you can override below file in your theme and update footer container also add custom link



                            <?xml version="1.0"?> 
                        <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body>
                        <referenceContainer name="footer">
                        <referenceBlock name="form.subscribe">
                        <block class="vendormoduleBlockNavigationCustomer" after="-" name="vendor_accountr_footer" template="footer/custom.phtml"/>
                        <block class="MagentoFrameworkViewElementHtmlLink" name="custom-link">
                        <arguments>
                        <argument name="label" xsi:type="string">Custom Link</argument>
                        <!-- This will be displayed as the label of the link -->
                        <argument name="path" xsi:type="string">path/to/page</argument>
                        <!-- here give the path where the link redirect to -->
                        </arguments>
                        </block>
                        </referenceBlock>
                        </referenceContainer>
                        </body>
                        </page>






                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited yesterday

























                        answered yesterday









                        Rakesh DongaRakesh Donga

                        1,513316




                        1,513316













                        • <?xml version="1.0"?> <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="footer"> <referenceBlock name="form.subscribe"> <block class="vendormoduleBlockNavigationCustomer" after="-" name="vendor_accountr_footer" template="footer/custom.phtml"/> </referenceBlock> </referenceContainer> </body> </page>

                          – Gomathi
                          yesterday











                        • i want to add link inside newsletter block in app/code itself

                          – Gomathi
                          yesterday











                        • i have added first code this code worked code

                          – Rakesh Donga
                          yesterday











                        • Let me know if you have any confusion for implementation.

                          – Rakesh Donga
                          yesterday











                        • actually i dnt want to override template through design , just from code itself i need to add link inside newsletter block

                          – Gomathi
                          yesterday



















                        • <?xml version="1.0"?> <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="footer"> <referenceBlock name="form.subscribe"> <block class="vendormoduleBlockNavigationCustomer" after="-" name="vendor_accountr_footer" template="footer/custom.phtml"/> </referenceBlock> </referenceContainer> </body> </page>

                          – Gomathi
                          yesterday











                        • i want to add link inside newsletter block in app/code itself

                          – Gomathi
                          yesterday











                        • i have added first code this code worked code

                          – Rakesh Donga
                          yesterday











                        • Let me know if you have any confusion for implementation.

                          – Rakesh Donga
                          yesterday











                        • actually i dnt want to override template through design , just from code itself i need to add link inside newsletter block

                          – Gomathi
                          yesterday

















                        <?xml version="1.0"?> <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="footer"> <referenceBlock name="form.subscribe"> <block class="vendormoduleBlockNavigationCustomer" after="-" name="vendor_accountr_footer" template="footer/custom.phtml"/> </referenceBlock> </referenceContainer> </body> </page>

                        – Gomathi
                        yesterday





                        <?xml version="1.0"?> <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="footer"> <referenceBlock name="form.subscribe"> <block class="vendormoduleBlockNavigationCustomer" after="-" name="vendor_accountr_footer" template="footer/custom.phtml"/> </referenceBlock> </referenceContainer> </body> </page>

                        – Gomathi
                        yesterday













                        i want to add link inside newsletter block in app/code itself

                        – Gomathi
                        yesterday





                        i want to add link inside newsletter block in app/code itself

                        – Gomathi
                        yesterday













                        i have added first code this code worked code

                        – Rakesh Donga
                        yesterday





                        i have added first code this code worked code

                        – Rakesh Donga
                        yesterday













                        Let me know if you have any confusion for implementation.

                        – Rakesh Donga
                        yesterday





                        Let me know if you have any confusion for implementation.

                        – Rakesh Donga
                        yesterday













                        actually i dnt want to override template through design , just from code itself i need to add link inside newsletter block

                        – Gomathi
                        yesterday





                        actually i dnt want to override template through design , just from code itself i need to add link inside newsletter block

                        – Gomathi
                        yesterday











                        0














                        In order to call links and custom block in footer in magento 2.



                        So, the file which is used to define configurations of footer is default.xml. This file will be located under app/code/Namespace/Module/view/frontend/layout/. This file calls on every page, that’s why we write code for footer in this file.



                        Below code is used to call custom links in footer :



                        <referenceBlock name="footer_links">
                        <block class="MagentoFrameworkViewElementHtmlLink" name="custom-link">
                        <arguments>
                        <argument name="label" xsi:type="string">Custom Link</argument>
                        <!-- This will be displayed as the label of the link -->
                        <argument name="path" xsi:type="string">path/to/page</argument>
                        <!-- here give the path where the link redirect to -->
                        </arguments>
                        </block>
                        </referenceBlock>


                        Now If you want to add your own custom block and template inside the footer,
                        then below code will be used :



                        <referenceContainer name="footer-container">
                        <block class="MagentoThemeBlockHtmlFooter" name="custom_block" as="custom_block" template="custom.phtml"/>
                        </referenceContainer>





                        share|improve this answer




























                          0














                          In order to call links and custom block in footer in magento 2.



                          So, the file which is used to define configurations of footer is default.xml. This file will be located under app/code/Namespace/Module/view/frontend/layout/. This file calls on every page, that’s why we write code for footer in this file.



                          Below code is used to call custom links in footer :



                          <referenceBlock name="footer_links">
                          <block class="MagentoFrameworkViewElementHtmlLink" name="custom-link">
                          <arguments>
                          <argument name="label" xsi:type="string">Custom Link</argument>
                          <!-- This will be displayed as the label of the link -->
                          <argument name="path" xsi:type="string">path/to/page</argument>
                          <!-- here give the path where the link redirect to -->
                          </arguments>
                          </block>
                          </referenceBlock>


                          Now If you want to add your own custom block and template inside the footer,
                          then below code will be used :



                          <referenceContainer name="footer-container">
                          <block class="MagentoThemeBlockHtmlFooter" name="custom_block" as="custom_block" template="custom.phtml"/>
                          </referenceContainer>





                          share|improve this answer


























                            0












                            0








                            0







                            In order to call links and custom block in footer in magento 2.



                            So, the file which is used to define configurations of footer is default.xml. This file will be located under app/code/Namespace/Module/view/frontend/layout/. This file calls on every page, that’s why we write code for footer in this file.



                            Below code is used to call custom links in footer :



                            <referenceBlock name="footer_links">
                            <block class="MagentoFrameworkViewElementHtmlLink" name="custom-link">
                            <arguments>
                            <argument name="label" xsi:type="string">Custom Link</argument>
                            <!-- This will be displayed as the label of the link -->
                            <argument name="path" xsi:type="string">path/to/page</argument>
                            <!-- here give the path where the link redirect to -->
                            </arguments>
                            </block>
                            </referenceBlock>


                            Now If you want to add your own custom block and template inside the footer,
                            then below code will be used :



                            <referenceContainer name="footer-container">
                            <block class="MagentoThemeBlockHtmlFooter" name="custom_block" as="custom_block" template="custom.phtml"/>
                            </referenceContainer>





                            share|improve this answer













                            In order to call links and custom block in footer in magento 2.



                            So, the file which is used to define configurations of footer is default.xml. This file will be located under app/code/Namespace/Module/view/frontend/layout/. This file calls on every page, that’s why we write code for footer in this file.



                            Below code is used to call custom links in footer :



                            <referenceBlock name="footer_links">
                            <block class="MagentoFrameworkViewElementHtmlLink" name="custom-link">
                            <arguments>
                            <argument name="label" xsi:type="string">Custom Link</argument>
                            <!-- This will be displayed as the label of the link -->
                            <argument name="path" xsi:type="string">path/to/page</argument>
                            <!-- here give the path where the link redirect to -->
                            </arguments>
                            </block>
                            </referenceBlock>


                            Now If you want to add your own custom block and template inside the footer,
                            then below code will be used :



                            <referenceContainer name="footer-container">
                            <block class="MagentoThemeBlockHtmlFooter" name="custom_block" as="custom_block" template="custom.phtml"/>
                            </referenceContainer>






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered yesterday









                            Muhammad HashamMuhammad Hasham

                            2,1211629




                            2,1211629























                                0














                                Copy subscribe.phtml file form



                                vendor/magento/module-newsletter/view/frontend/templates/


                                and paste to you custom theme at following location



                                app/design/frontend/<vendor name>/<theme name>/Magento_Newsletter/templates/



                                Now add custom link to subscribe.phtml file



                                I hope this will help you






                                share|improve this answer




























                                  0














                                  Copy subscribe.phtml file form



                                  vendor/magento/module-newsletter/view/frontend/templates/


                                  and paste to you custom theme at following location



                                  app/design/frontend/<vendor name>/<theme name>/Magento_Newsletter/templates/



                                  Now add custom link to subscribe.phtml file



                                  I hope this will help you






                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    Copy subscribe.phtml file form



                                    vendor/magento/module-newsletter/view/frontend/templates/


                                    and paste to you custom theme at following location



                                    app/design/frontend/<vendor name>/<theme name>/Magento_Newsletter/templates/



                                    Now add custom link to subscribe.phtml file



                                    I hope this will help you






                                    share|improve this answer













                                    Copy subscribe.phtml file form



                                    vendor/magento/module-newsletter/view/frontend/templates/


                                    and paste to you custom theme at following location



                                    app/design/frontend/<vendor name>/<theme name>/Magento_Newsletter/templates/



                                    Now add custom link to subscribe.phtml file



                                    I hope this will help you







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered yesterday









                                    user55548user55548

                                    30129




                                    30129






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Magento Stack Exchange!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f264485%2fmagento2-how-to-add-custom-link-in-footer-inside-newsletter-block%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        Cannot install PyQt5 The Next CEO of Stack OverflowCannot install tcpreplay 3.4.4cannot...

                                        Kapp-Putsch Acontecimentos | Outros artigos | Menu de navegação

                                        Why did early computer designers eschew integers? The Next CEO of Stack OverflowWhat register...