How to insert a link in Magento 2?How to redirect a category page link to CMS page link in Magento 2How can I move compare product link in header | Magento 2Magento 2 : Convert Attribute to LinkCustom Customer Account Link related page is not having navigation links on left side: Magento 2In Customer Account Dashboard Page i have added linkMagento : Upload .GIF image for a ProductMove theme layout elements on a product view from within a Module Magento 2How to insert specific invoice items in sales_invoice_item Table?How to copy a module in Magento2?How to create two pages from a same module in Magento 2?

If your plane is out-of-control, why does military training instruct releasing the joystick to neutralize controls?

Why are they 'nude photos'?

Switching interface VLAN ID Mid-Production

How to drill holes in 3/8" thick steel plates?

How to deal with moral/legal subjects in writing?

Should disabled buttons give feedback when clicked?

Is English unusual in having no second person plural form?

How to befriend private nested class

Misspelling my name on my mathematical publications

Fast validation of time windows in a routing problem

How do you move up one folder in Finder?

Confirming the Identity of a (Friendly) Reviewer After the Reviews

Sharing shapefile collection

Why is the ladder of the LM always in the dark side of the LM?

Employers keep telling me my college isn't good enough - is there any way to fix this?

Some interesting calculation puzzle that I made

Are there any medieval light sources without fire?

Does throwing a penny at a train stop the train?

Why did Harry Potter get a bedroom?

How can I truly shut down ssh server?

Graduate student with abysmal English writing skills, how to help

What is a "shilicashe?"

Why was hardware diversification an asset for the IBM PC ecosystem?

Why do we need common sense in AI?



How to insert a link in Magento 2?


How to redirect a category page link to CMS page link in Magento 2How can I move compare product link in header | Magento 2Magento 2 : Convert Attribute to LinkCustom Customer Account Link related page is not having navigation links on left side: Magento 2In Customer Account Dashboard Page i have added linkMagento : Upload .GIF image for a ProductMove theme layout elements on a product view from within a Module Magento 2How to insert specific invoice items in sales_invoice_item Table?How to copy a module in Magento2?How to create two pages from a same module in Magento 2?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I'm very new to Magento. I have created a page, and I want to insert a link.



I have this page:
enter image description here



When clicking on "Order Detail", It's will move to another page. I tried to research but I can't find a solution.
Can anyone help??? Thanks










share|improve this question
























  • If you have any confusion, feel free to ask me.

    – Rohan Hapani
    Jul 2 at 9:00











  • +1 for accept :) You can give upvote also by click on up arrow button. Happy coding :)

    – Rohan Hapani
    Jul 2 at 9:03











  • Thanks @Rohan. it worked fine

    – user81098
    Jul 2 at 9:03

















2















I'm very new to Magento. I have created a page, and I want to insert a link.



I have this page:
enter image description here



When clicking on "Order Detail", It's will move to another page. I tried to research but I can't find a solution.
Can anyone help??? Thanks










share|improve this question
























  • If you have any confusion, feel free to ask me.

    – Rohan Hapani
    Jul 2 at 9:00











  • +1 for accept :) You can give upvote also by click on up arrow button. Happy coding :)

    – Rohan Hapani
    Jul 2 at 9:03











  • Thanks @Rohan. it worked fine

    – user81098
    Jul 2 at 9:03













2












2








2








I'm very new to Magento. I have created a page, and I want to insert a link.



I have this page:
enter image description here



When clicking on "Order Detail", It's will move to another page. I tried to research but I can't find a solution.
Can anyone help??? Thanks










share|improve this question
















I'm very new to Magento. I have created a page, and I want to insert a link.



I have this page:
enter image description here



When clicking on "Order Detail", It's will move to another page. I tried to research but I can't find a solution.
Can anyone help??? Thanks







magento2 product






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 2 at 8:48









Shorabh

1,0876 silver badges15 bronze badges




1,0876 silver badges15 bronze badges










asked Jul 2 at 8:42









user81098user81098

447 bronze badges




447 bronze badges












  • If you have any confusion, feel free to ask me.

    – Rohan Hapani
    Jul 2 at 9:00











  • +1 for accept :) You can give upvote also by click on up arrow button. Happy coding :)

    – Rohan Hapani
    Jul 2 at 9:03











  • Thanks @Rohan. it worked fine

    – user81098
    Jul 2 at 9:03

















  • If you have any confusion, feel free to ask me.

    – Rohan Hapani
    Jul 2 at 9:00











  • +1 for accept :) You can give upvote also by click on up arrow button. Happy coding :)

    – Rohan Hapani
    Jul 2 at 9:03











  • Thanks @Rohan. it worked fine

    – user81098
    Jul 2 at 9:03
















If you have any confusion, feel free to ask me.

– Rohan Hapani
Jul 2 at 9:00





If you have any confusion, feel free to ask me.

– Rohan Hapani
Jul 2 at 9:00













+1 for accept :) You can give upvote also by click on up arrow button. Happy coding :)

– Rohan Hapani
Jul 2 at 9:03





+1 for accept :) You can give upvote also by click on up arrow button. Happy coding :)

– Rohan Hapani
Jul 2 at 9:03













Thanks @Rohan. it worked fine

– user81098
Jul 2 at 9:03





Thanks @Rohan. it worked fine

– user81098
Jul 2 at 9:03










3 Answers
3






active

oldest

votes


















2














If you want to redirect on custom module page. Then, you should create this files :




Create front router file : app/code/Vendor/Helloworld/etc/frontend/routes.xml




<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="standard">
<route id="helloworld" frontName="helloworld">
<module name="Vendor_Helloworld"/>
</route>
</router>
</config>



Create new controller : app/code/Vendor/Helloworld/Controller/Index/Index.php




<?php
namespace VendorHelloworldControllerIndex;
class Index extends MagentoFrameworkAppActionAction

/**
* @var MagentoFrameworkViewResultPageFactory
*/
protected $resultPageFactory;
/**
* @param MagentoFrameworkAppActionContext $context
* @param MagentoFrameworkViewResultPageFactory resultPageFactory
*/
public function __construct(
MagentoFrameworkAppActionContext $context,
MagentoFrameworkViewResultPageFactory $resultPageFactory
)

$this->resultPageFactory = $resultPageFactory;
parent::__construct($context);

/**
* Default customer account page
*
* @return void
*/
public function execute()

$resultPage = $this->resultPageFactory->create();
$resultPage->getConfig()->getTitle()->prepend(__('Welcome to RH Helloworld module'));
return $resultPage;


?>



Create Block file : VendorHelloworldBlockHelloworld.php




<?php
namespace VendorHelloworldBlock;
class Helloworld extends MagentoFrameworkViewElementTemplate

public function __construct(
MagentoFrameworkViewElementTemplateContext $context,
array $data = []
)

parent::__construct($context, $data);

public function getHelloworldData()

return 'Helloworld block file call successfully';


?>



Create layout file : Vendor/Helloworld/view/frontend/layout/helloworld_index_index.xml




<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="VendorHelloworldBlockHelloworld" name="formbuilder" template="Vendor_Helloworld::helloworld.phtml"/>
</referenceContainer>
</body>
</page>



Create template file : Vendor/Helloworld/view/frontend/templates/helloworld.phtml




<h3>
<?php echo $block->getHelloworldData(); ?>
</h3>


=====================================================================



Now, add link in your phtml like :



<a href="<?pgp echo $this->getUrl("helloworld/index/index"); ?>">Order Detail</a>


I hope it will helpful for you.






share|improve this answer






























    1














    Use product getProductUrl() function like.



    <a href="<?pgp echo $_product->getProductUrl(); ?>">Order Detail</a>





    share|improve this answer























    • Hi @Shorabh. I'm trying to do like this:<td data-th="<?= $block->escapeHtml(__('Actions')) ?>" class="col actions"> <a href="<?= $block->getDetailUrl($item) ?>" class="action view"> <span><?= $block->escapeHtml(__('Order Detail')) ?></span> </a> </td> Could you explain more detail about your answered? thanks

      – user81098
      Jul 2 at 8:52



















    1














    You can add link with this reference :-



    $objectManager = MagentoFrameworkAppObjectManager::getInstance();
    $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
    $baseURL = $storeManager->getStore()->getBaseUrl();

    $baseURL is your site URL and you can append page name as required

    <a href="<?php echo $baseURL; ?>YourPageName">Order Detail</a>





    share|improve this answer

























    • Don't use object manager direct. It's bad practise.

      – Rohan Hapani
      Jul 2 at 9:02













    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%2f280403%2fhow-to-insert-a-link-in-magento-2%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    If you want to redirect on custom module page. Then, you should create this files :




    Create front router file : app/code/Vendor/Helloworld/etc/frontend/routes.xml




    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
    <route id="helloworld" frontName="helloworld">
    <module name="Vendor_Helloworld"/>
    </route>
    </router>
    </config>



    Create new controller : app/code/Vendor/Helloworld/Controller/Index/Index.php




    <?php
    namespace VendorHelloworldControllerIndex;
    class Index extends MagentoFrameworkAppActionAction

    /**
    * @var MagentoFrameworkViewResultPageFactory
    */
    protected $resultPageFactory;
    /**
    * @param MagentoFrameworkAppActionContext $context
    * @param MagentoFrameworkViewResultPageFactory resultPageFactory
    */
    public function __construct(
    MagentoFrameworkAppActionContext $context,
    MagentoFrameworkViewResultPageFactory $resultPageFactory
    )

    $this->resultPageFactory = $resultPageFactory;
    parent::__construct($context);

    /**
    * Default customer account page
    *
    * @return void
    */
    public function execute()

    $resultPage = $this->resultPageFactory->create();
    $resultPage->getConfig()->getTitle()->prepend(__('Welcome to RH Helloworld module'));
    return $resultPage;


    ?>



    Create Block file : VendorHelloworldBlockHelloworld.php




    <?php
    namespace VendorHelloworldBlock;
    class Helloworld extends MagentoFrameworkViewElementTemplate

    public function __construct(
    MagentoFrameworkViewElementTemplateContext $context,
    array $data = []
    )

    parent::__construct($context, $data);

    public function getHelloworldData()

    return 'Helloworld block file call successfully';


    ?>



    Create layout file : Vendor/Helloworld/view/frontend/layout/helloworld_index_index.xml




    <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
    <referenceContainer name="content">
    <block class="VendorHelloworldBlockHelloworld" name="formbuilder" template="Vendor_Helloworld::helloworld.phtml"/>
    </referenceContainer>
    </body>
    </page>



    Create template file : Vendor/Helloworld/view/frontend/templates/helloworld.phtml




    <h3>
    <?php echo $block->getHelloworldData(); ?>
    </h3>


    =====================================================================



    Now, add link in your phtml like :



    <a href="<?pgp echo $this->getUrl("helloworld/index/index"); ?>">Order Detail</a>


    I hope it will helpful for you.






    share|improve this answer



























      2














      If you want to redirect on custom module page. Then, you should create this files :




      Create front router file : app/code/Vendor/Helloworld/etc/frontend/routes.xml




      <?xml version="1.0"?>
      <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
      <router id="standard">
      <route id="helloworld" frontName="helloworld">
      <module name="Vendor_Helloworld"/>
      </route>
      </router>
      </config>



      Create new controller : app/code/Vendor/Helloworld/Controller/Index/Index.php




      <?php
      namespace VendorHelloworldControllerIndex;
      class Index extends MagentoFrameworkAppActionAction

      /**
      * @var MagentoFrameworkViewResultPageFactory
      */
      protected $resultPageFactory;
      /**
      * @param MagentoFrameworkAppActionContext $context
      * @param MagentoFrameworkViewResultPageFactory resultPageFactory
      */
      public function __construct(
      MagentoFrameworkAppActionContext $context,
      MagentoFrameworkViewResultPageFactory $resultPageFactory
      )

      $this->resultPageFactory = $resultPageFactory;
      parent::__construct($context);

      /**
      * Default customer account page
      *
      * @return void
      */
      public function execute()

      $resultPage = $this->resultPageFactory->create();
      $resultPage->getConfig()->getTitle()->prepend(__('Welcome to RH Helloworld module'));
      return $resultPage;


      ?>



      Create Block file : VendorHelloworldBlockHelloworld.php




      <?php
      namespace VendorHelloworldBlock;
      class Helloworld extends MagentoFrameworkViewElementTemplate

      public function __construct(
      MagentoFrameworkViewElementTemplateContext $context,
      array $data = []
      )

      parent::__construct($context, $data);

      public function getHelloworldData()

      return 'Helloworld block file call successfully';


      ?>



      Create layout file : Vendor/Helloworld/view/frontend/layout/helloworld_index_index.xml




      <?xml version="1.0"?>
      <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
      <body>
      <referenceContainer name="content">
      <block class="VendorHelloworldBlockHelloworld" name="formbuilder" template="Vendor_Helloworld::helloworld.phtml"/>
      </referenceContainer>
      </body>
      </page>



      Create template file : Vendor/Helloworld/view/frontend/templates/helloworld.phtml




      <h3>
      <?php echo $block->getHelloworldData(); ?>
      </h3>


      =====================================================================



      Now, add link in your phtml like :



      <a href="<?pgp echo $this->getUrl("helloworld/index/index"); ?>">Order Detail</a>


      I hope it will helpful for you.






      share|improve this answer

























        2












        2








        2







        If you want to redirect on custom module page. Then, you should create this files :




        Create front router file : app/code/Vendor/Helloworld/etc/frontend/routes.xml




        <?xml version="1.0"?>
        <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
        <router id="standard">
        <route id="helloworld" frontName="helloworld">
        <module name="Vendor_Helloworld"/>
        </route>
        </router>
        </config>



        Create new controller : app/code/Vendor/Helloworld/Controller/Index/Index.php




        <?php
        namespace VendorHelloworldControllerIndex;
        class Index extends MagentoFrameworkAppActionAction

        /**
        * @var MagentoFrameworkViewResultPageFactory
        */
        protected $resultPageFactory;
        /**
        * @param MagentoFrameworkAppActionContext $context
        * @param MagentoFrameworkViewResultPageFactory resultPageFactory
        */
        public function __construct(
        MagentoFrameworkAppActionContext $context,
        MagentoFrameworkViewResultPageFactory $resultPageFactory
        )

        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);

        /**
        * Default customer account page
        *
        * @return void
        */
        public function execute()

        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->prepend(__('Welcome to RH Helloworld module'));
        return $resultPage;


        ?>



        Create Block file : VendorHelloworldBlockHelloworld.php




        <?php
        namespace VendorHelloworldBlock;
        class Helloworld extends MagentoFrameworkViewElementTemplate

        public function __construct(
        MagentoFrameworkViewElementTemplateContext $context,
        array $data = []
        )

        parent::__construct($context, $data);

        public function getHelloworldData()

        return 'Helloworld block file call successfully';


        ?>



        Create layout file : Vendor/Helloworld/view/frontend/layout/helloworld_index_index.xml




        <?xml version="1.0"?>
        <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
        <referenceContainer name="content">
        <block class="VendorHelloworldBlockHelloworld" name="formbuilder" template="Vendor_Helloworld::helloworld.phtml"/>
        </referenceContainer>
        </body>
        </page>



        Create template file : Vendor/Helloworld/view/frontend/templates/helloworld.phtml




        <h3>
        <?php echo $block->getHelloworldData(); ?>
        </h3>


        =====================================================================



        Now, add link in your phtml like :



        <a href="<?pgp echo $this->getUrl("helloworld/index/index"); ?>">Order Detail</a>


        I hope it will helpful for you.






        share|improve this answer













        If you want to redirect on custom module page. Then, you should create this files :




        Create front router file : app/code/Vendor/Helloworld/etc/frontend/routes.xml




        <?xml version="1.0"?>
        <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
        <router id="standard">
        <route id="helloworld" frontName="helloworld">
        <module name="Vendor_Helloworld"/>
        </route>
        </router>
        </config>



        Create new controller : app/code/Vendor/Helloworld/Controller/Index/Index.php




        <?php
        namespace VendorHelloworldControllerIndex;
        class Index extends MagentoFrameworkAppActionAction

        /**
        * @var MagentoFrameworkViewResultPageFactory
        */
        protected $resultPageFactory;
        /**
        * @param MagentoFrameworkAppActionContext $context
        * @param MagentoFrameworkViewResultPageFactory resultPageFactory
        */
        public function __construct(
        MagentoFrameworkAppActionContext $context,
        MagentoFrameworkViewResultPageFactory $resultPageFactory
        )

        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);

        /**
        * Default customer account page
        *
        * @return void
        */
        public function execute()

        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->prepend(__('Welcome to RH Helloworld module'));
        return $resultPage;


        ?>



        Create Block file : VendorHelloworldBlockHelloworld.php




        <?php
        namespace VendorHelloworldBlock;
        class Helloworld extends MagentoFrameworkViewElementTemplate

        public function __construct(
        MagentoFrameworkViewElementTemplateContext $context,
        array $data = []
        )

        parent::__construct($context, $data);

        public function getHelloworldData()

        return 'Helloworld block file call successfully';


        ?>



        Create layout file : Vendor/Helloworld/view/frontend/layout/helloworld_index_index.xml




        <?xml version="1.0"?>
        <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
        <referenceContainer name="content">
        <block class="VendorHelloworldBlockHelloworld" name="formbuilder" template="Vendor_Helloworld::helloworld.phtml"/>
        </referenceContainer>
        </body>
        </page>



        Create template file : Vendor/Helloworld/view/frontend/templates/helloworld.phtml




        <h3>
        <?php echo $block->getHelloworldData(); ?>
        </h3>


        =====================================================================



        Now, add link in your phtml like :



        <a href="<?pgp echo $this->getUrl("helloworld/index/index"); ?>">Order Detail</a>


        I hope it will helpful for you.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 2 at 8:58









        Rohan HapaniRohan Hapani

        7,6364 gold badges20 silver badges65 bronze badges




        7,6364 gold badges20 silver badges65 bronze badges























            1














            Use product getProductUrl() function like.



            <a href="<?pgp echo $_product->getProductUrl(); ?>">Order Detail</a>





            share|improve this answer























            • Hi @Shorabh. I'm trying to do like this:<td data-th="<?= $block->escapeHtml(__('Actions')) ?>" class="col actions"> <a href="<?= $block->getDetailUrl($item) ?>" class="action view"> <span><?= $block->escapeHtml(__('Order Detail')) ?></span> </a> </td> Could you explain more detail about your answered? thanks

              – user81098
              Jul 2 at 8:52
















            1














            Use product getProductUrl() function like.



            <a href="<?pgp echo $_product->getProductUrl(); ?>">Order Detail</a>





            share|improve this answer























            • Hi @Shorabh. I'm trying to do like this:<td data-th="<?= $block->escapeHtml(__('Actions')) ?>" class="col actions"> <a href="<?= $block->getDetailUrl($item) ?>" class="action view"> <span><?= $block->escapeHtml(__('Order Detail')) ?></span> </a> </td> Could you explain more detail about your answered? thanks

              – user81098
              Jul 2 at 8:52














            1












            1








            1







            Use product getProductUrl() function like.



            <a href="<?pgp echo $_product->getProductUrl(); ?>">Order Detail</a>





            share|improve this answer













            Use product getProductUrl() function like.



            <a href="<?pgp echo $_product->getProductUrl(); ?>">Order Detail</a>






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jul 2 at 8:46









            ShorabhShorabh

            1,0876 silver badges15 bronze badges




            1,0876 silver badges15 bronze badges












            • Hi @Shorabh. I'm trying to do like this:<td data-th="<?= $block->escapeHtml(__('Actions')) ?>" class="col actions"> <a href="<?= $block->getDetailUrl($item) ?>" class="action view"> <span><?= $block->escapeHtml(__('Order Detail')) ?></span> </a> </td> Could you explain more detail about your answered? thanks

              – user81098
              Jul 2 at 8:52


















            • Hi @Shorabh. I'm trying to do like this:<td data-th="<?= $block->escapeHtml(__('Actions')) ?>" class="col actions"> <a href="<?= $block->getDetailUrl($item) ?>" class="action view"> <span><?= $block->escapeHtml(__('Order Detail')) ?></span> </a> </td> Could you explain more detail about your answered? thanks

              – user81098
              Jul 2 at 8:52

















            Hi @Shorabh. I'm trying to do like this:<td data-th="<?= $block->escapeHtml(__('Actions')) ?>" class="col actions"> <a href="<?= $block->getDetailUrl($item) ?>" class="action view"> <span><?= $block->escapeHtml(__('Order Detail')) ?></span> </a> </td> Could you explain more detail about your answered? thanks

            – user81098
            Jul 2 at 8:52






            Hi @Shorabh. I'm trying to do like this:<td data-th="<?= $block->escapeHtml(__('Actions')) ?>" class="col actions"> <a href="<?= $block->getDetailUrl($item) ?>" class="action view"> <span><?= $block->escapeHtml(__('Order Detail')) ?></span> </a> </td> Could you explain more detail about your answered? thanks

            – user81098
            Jul 2 at 8:52












            1














            You can add link with this reference :-



            $objectManager = MagentoFrameworkAppObjectManager::getInstance();
            $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
            $baseURL = $storeManager->getStore()->getBaseUrl();

            $baseURL is your site URL and you can append page name as required

            <a href="<?php echo $baseURL; ?>YourPageName">Order Detail</a>





            share|improve this answer

























            • Don't use object manager direct. It's bad practise.

              – Rohan Hapani
              Jul 2 at 9:02















            1














            You can add link with this reference :-



            $objectManager = MagentoFrameworkAppObjectManager::getInstance();
            $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
            $baseURL = $storeManager->getStore()->getBaseUrl();

            $baseURL is your site URL and you can append page name as required

            <a href="<?php echo $baseURL; ?>YourPageName">Order Detail</a>





            share|improve this answer

























            • Don't use object manager direct. It's bad practise.

              – Rohan Hapani
              Jul 2 at 9:02













            1












            1








            1







            You can add link with this reference :-



            $objectManager = MagentoFrameworkAppObjectManager::getInstance();
            $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
            $baseURL = $storeManager->getStore()->getBaseUrl();

            $baseURL is your site URL and you can append page name as required

            <a href="<?php echo $baseURL; ?>YourPageName">Order Detail</a>





            share|improve this answer















            You can add link with this reference :-



            $objectManager = MagentoFrameworkAppObjectManager::getInstance();
            $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
            $baseURL = $storeManager->getStore()->getBaseUrl();

            $baseURL is your site URL and you can append page name as required

            <a href="<?php echo $baseURL; ?>YourPageName">Order Detail</a>






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 2 at 9:01









            Rohan Hapani

            7,6364 gold badges20 silver badges65 bronze badges




            7,6364 gold badges20 silver badges65 bronze badges










            answered Jul 2 at 8:58









            Kinjal PatelKinjal Patel

            393 bronze badges




            393 bronze badges












            • Don't use object manager direct. It's bad practise.

              – Rohan Hapani
              Jul 2 at 9:02

















            • Don't use object manager direct. It's bad practise.

              – Rohan Hapani
              Jul 2 at 9:02
















            Don't use object manager direct. It's bad practise.

            – Rohan Hapani
            Jul 2 at 9:02





            Don't use object manager direct. It's bad practise.

            – Rohan Hapani
            Jul 2 at 9:02

















            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%2f280403%2fhow-to-insert-a-link-in-magento-2%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

            Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

            Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

            Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?