9

how do I get my module link identifier in the footer from the core config values I set in the admin system configuration

<referenceBlock name="footer_links">
        <block class="Magento\Framework\View\Element\Html\Link\Current" name="storelocator-policy-link">
            <arguments >
                <argument ifconfig="googlemapsstorelocator/general/enable" name="label" xsi:type="string">Google Maps Store Locator</argument>
                <argument name="path" xsi:type="string">I need this value form the configuration settings</argument>
            </arguments>
        </block>
</referenceBlock> 
7

You have to write a "helper" (a method in any class of your module) and use xsi:type="helper as described here: How to get output from helper for path argument in layout?

You should do the same for the first argument, because the argument element cannot have an ifconfig attribute (or move ifconfig to the block to not add it at all if the "enable" configuration is not set).

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.