53 votes
Accepted

Magento 2 get base url (current store) in admin static block/page?

You can add current store URL in static block. {{store url=""}} If you wanto add store url with category URL. {{store url="category-url"}}
Suresh Chikani's user avatar
12 votes
Accepted

How to add custom link in main menu in Magento 2?

copy file from vendor/magento/module-theme/view/frontend/templates/html/topmenu.phtml and put this file in your theme location app/design/frontend/Vendor/YourTheme/Magento_Theme/templates/html/...
Suresh Chikani's user avatar
12 votes

How to add custom link in main menu in Magento 2?

Another alternative is to use a new template file via layout xml. ./app/design/frontend/Company/Yourtheme/Magento_Theme/layout/default.xml <?xml version="1.0"?> <!-- /** * Copyright info....
Dilhan Maduranga's user avatar
11 votes

Magento 2 get base url (current store) in admin static block/page?

You can add store URL in static block: <a href="{{store direct_url='identifier'}}">Your link</a>
SIDDHANT JAIN's user avatar
11 votes
Accepted

store_url does not render link correctly

Add store direct_url instead of store_url <a href="{{store direct_url='produkte/insektenschutz/fenster/spannrahmen.html'}}"> spannrahmen.html will show after this.
Shoaib Munir's user avatar
  • 9,434
10 votes

How can I use a link in string to translate at Magento 2?

HTML code should not be used directly in a translation string, instead use a placeholder (i.e. %1) to represent it, and put it's value in a subsequent parameter to the translation method. <?= __('...
Holly's user avatar
  • 4,873
10 votes
Accepted

How can I use a link in string to translate at Magento 2?

Your solution might look something like this: <a href="<?php echo $block->escapeUrl($this->getBaseUrl().'customer/address/');?>"> <?php echo $block->escapeHtml(__('Street ...
joni jones's user avatar
  • 2,549
8 votes

store_url does not render link correctly

Try adding this to your block: <a href="{{store direct_url="produkte/insektenschutz/fenster/spannrahmen.html"}}">Link to Base URL</a>
HIren Kadivar's user avatar
7 votes
Accepted

Custom grid - Remove link on rows

Create below method in you block grid class: YourModule_Adminhtml_Block_XXX_YYY_Grid extend Mage_Adminhtml_Block_Widget_Grid public function getRowUrl($row) { return false; }
Jayesh Patel's user avatar
  • 2,118
7 votes
Accepted

Add Custom link in customer account navigation in Magento 2

If you want to do sort the link to then follow. Create default.xml in following directory app/code/SpaceName/ModuleName/view/frontend/layout <?xml version="1.0"?> <!-- /** * Copyright © ...
Qaisar Satti's user avatar
  • 32.5k
6 votes

Magento 2 How to add Home link in navigation bar!

I have done by just overriding this file in my custom theme. app/design/frontend/Vendor/theme/Magento_Theme/templates/html/topmenu.phtml <?php $columnsLimit = $block->getColumnsLimit() ?: ...
Ravi Oza's user avatar
  • 478
5 votes

Change Account login text to icon, standard magento or any other

To change login text link You can start with template vendor/magento/module-customer/view/frontend/templates/account/link/authorization.phtml. Add new method to verify if user is login/logout and add ...
Volodymyr Lisniak's user avatar
4 votes

Magento 2: How to increase link expire time for Reset Password

Set Expiration time from backend, Stores -> Configuration -> Customer Configuration -> Password Options -> Recovery Link Expiration Period (hours) You can change 2 to any value in hour. For ...
Rakesh Jesadiya's user avatar
4 votes

How to add href to custom attribute in customer grid?

Try following way: Add column into your grid list Vendor/Module/view/adminhtml/ui_component/route_model_listing.xml <column name="reference" class="Vendor\Module\Ui\Component\Listing\Columns\...
Sohel Rana's user avatar
  • 35.8k
4 votes
Accepted

Moving header links in Magento 1.9

Magento 1 uses the block Mage_Page_Block_Template_Links in the default theme as the block that renders the links. To add links, use the following code in a layout.xml file: <reference name="top....
tjons's user avatar
  • 1,831
4 votes
Accepted

In Customer Account Dashboard Page i have added link

You Have to put these code in your Custom xml file File Path:app/code/Custom/Customerdashboard/view/frontend/layout/customerdashboard_index_index.xml <page xmlns:xsi="http://www.w3....
Learing_Coder's user avatar
4 votes
Accepted

Magento 2 How to add Home link in navigation bar!

You can do it by creating a simple module: Create registration file: app/code/Magenik/NavLink/registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\...
Nikunj Vadariya's user avatar
4 votes

Add Custom link in customer account navigation in Magento 2

Create a layout file customer_account.xml inside Vendor\Module\view\frontend\layout and put below code. <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
Kanhaiya lal's user avatar
  • 1,548
3 votes

Magento2 admin panel, open an url in new tab using window.open

You should add attribute target="_blank" to your element. Something like this I think would work: if ($canModify) { $data = [ 'label' => __('Login As Customer'), ...
Anitr's user avatar
  • 448
3 votes

Remove "Reorder" Link from customer side

Go to System->Configuration->Sales -> Reorder Set the option “Allow Reorder” to No.
Piyush's user avatar
  • 5,893
3 votes

Magento2 how can i study fully magento2

This is one of the best site where you can lean Magento 2 step by step very easily. https://www.mageplaza.com/magento-2-module-development/magento-2-create-events.html From FireBear You can track ...
Prince Patel's user avatar
  • 22.7k
3 votes
Accepted

How to disable link in telephone phone number in address book?

You can change it easily from backend Admin > STORES > Configuration > CUSTOMERS > Customer configuration > Address Templates > HTML Replace HTML field content line with below {{depend telephone}}T:...
Prashant Valanda's user avatar
3 votes

How do I make a pdf link within website open in a new window?

Simply add target="_blank" in your anchor tag. It will open pdf in new tab instead of same page. <a href="https://www.clickdimensions.com/links/TestPDFfile.pdf" target="...
Gohil Rajesh's user avatar
  • 2,924
2 votes
Accepted

How to edit my-account-link in Magento2?

It is set from the xml file at below location : /magento-root/vendor/magento/module-customer/view/frontend/layout/default.xml -- <block class="Magento\Customer\Block\Account\Link" name="my-...
Manashvi Birla's user avatar
2 votes

Magento2 admin panel, open an url in new tab using window.open

$this->addButton( 'back', [ 'label' => __('New Tab'), 'onclick' => 'window.open(\'' . $this->getTabUrl() . '\',\'_blank\')', 'class' =&...
Keyur Shah's user avatar
2 votes
Accepted

Add new link to customer account page

For this you have to create a module. Inside your module create routes.xml in location app/code/Vendor/Module/etc/frontend/routes.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3....
P S's user avatar
  • 1,983
2 votes
Accepted

Remove Trailing Slash Using PHP

Have you tried echo rtrim(Mage::helper('supermenu')->getLinkbyItem($item), '/');
sv3n's user avatar
  • 11.7k
2 votes
Accepted

Add new link in my account (Magento 2)

Your path url and your layout file name are incorrect. Your frontName in routers.xml is yx_customer and not customer. customer_account.xml <referenceBlock name="customer_account_navigation"&...
Matthias_CompactCode's user avatar
2 votes

How to add custom column as link in sales order grid in magento 2

I have created one column as "sku" in a custom grid. It displays SKU as a link and also its redirect into view page. In XML: <column name="sku" class="XXX\Movements\Ui\Component\Listing\Columns\...
Mahi M's user avatar
  • 2,540
2 votes
Accepted

Magento 2 how to create link_title column for the table catalog_product_link

For create link_title column Create InstallSchema.php : app/code/RH/Helloworld/Setup/InstallSchema.php <?php namespace RH\Helloworld\Setup; use Magento\Framework\Setup\InstallSchemaInterface; ...
Rohan Hapani's user avatar
  • 17.4k

Only top scored, non community-wiki answers of a minimum length are eligible