Jump to content
thirty bees forum
  • 0

How create a link like this?


Havouza

Question

I have some links in the footer. One should go to an external page and I want it to open in a new tab. So I wrote it like this www.example.com/index.php target="_blank" The links are saved in a table The target attribute is shown when I hover the link but it does open in the same window when I click on it. Is there some other way to do this else than the obvious, right click

Link to comment
Share on other sites

16 answers to this question

Recommended Posts

  • 0

You have html error in it. You mess up with quote sign (").

Yours: <a href="https://webadmin-lin.demo.plesk.com:8443/smb target =&quot;_blank&quot;" title="Plesk Control Panel">Plesk Control Panel</a>

Correct: <a href="https://webadmin-lin.demo.plesk.com:8443/smb" target ="_blank" title="Plesk Control Panel">Plesk Control Panel</a>

Link to comment
Share on other sites

  • 0

This is the code in the tpl. To me it looks if a target is hardcoded here, all links will open in a new tab. Solution for that is to only place links here that should open outside the shop

            <ul id="footercustom_link_informations">
                <li class="footercustom_link_title footercustom_title">{$blocktitle1|escape:'html':'UTF-8'}</li>
                {foreach from=$blocks1 item=block name=loop}
                    <li>{if $block.link}<a href="{$block.link|escape:'html':'UTF-8'}" title="{$block.title|escape:'html':'UTF-8'}">{/if}{if $block.title}{$block.title|escape:'html':'UTF-8'}{/if}{if $block.link}</a>{/if}</li>
                {/foreach}
            </ul>
Link to comment
Share on other sites

  • 0

@Havouza said in How create a link like this?:

This is the code in the tpl. To me it looks if a target is hardcoded here, all links will open in a new tab. Solution for that is to only place links here that should open outside the shop

          <ul id="footercustom_link_informations">
              <li class="footercustom_link_title footercustom_title">{$blocktitle1|escape:'html':'UTF-8'}</li>
              {foreach from=$blocks1 item=block name=loop}
                  <li>{if $block.link}<a href="{$block.link|escape:'html':'UTF-8'}" title="{$block.title|escape:'html':'UTF-8'}">{/if}{if $block.title}{$block.title|escape:'html':'UTF-8'}{/if}{if $block.link}</a>{/if}</li>
              {/foreach}
          </ul>

Yeah you could solve it in your tpl file. The solution which comes to my mind is a bit ugly. But you could use something like: {if $block.id==anynumber}target="_blank"{/if}

I don't use this module, so I don't know if you have access to the id...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...