54
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"}}
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....
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/...
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>
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.
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.
<?= __('...
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 ...
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>
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 © ...
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() ?: ...
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 ...
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....
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\...
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 ...
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....
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\...
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"
...
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 ...
3
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' =&...
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'),
...
3
votes
Remove "Reorder" Link from customer side
Go to
System->Configuration->Sales -> Reorder
Set the option “Allow Reorder” to No.
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:...
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="...
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....
2
votes
Accepted
Remove Trailing Slash Using PHP
Have you tried
echo rtrim(Mage::helper('supermenu')->getLinkbyItem($item), '/');
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"&...
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\...
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;
...
2
votes
Magento 2: zend pdf anchor link not show in pdf file
$target = \Zend_Pdf_Action_URI :: create( $baseUrl );
$annotation = \Zend_Pdf_Annotation_Link :: create( 35, $this->y + 10, 100, $this->y - 5, $target );
$page->attachAnnotation( $annotation )...
2
votes
How do I make a pdf link within website open in a new window?
Are you opening this with a hyperlink?
If so just add the key target="_blank" to your hyperlink: Example:
<a href="url_to_your_pdf" target="_blank">Open</a>
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
link × 140magento2 × 52
magento-1.9 × 31
customer-account × 15
category × 10
redirect × 8
magento2.3 × 7
header × 7
navigation × 7
magento-2.1 × 6
layout × 6
blocks × 5
xml × 5
footer × 5
product × 4
customer × 4
custom × 4
cms × 4
topmenu × 4
toplinks × 4
magento-1.7 × 3
module × 3
adminhtml × 3
url × 3
pdf × 3