Okay
  Public Ticket #587555
Column Link
Closed

Comments

  • John started the conversation

    I was wondering how to make the Page Builder's Column Link Open in a New Tab.

    Currently, it opens within, the same page. But for the project I'm working on, I'm going to need certain links to open to external pages and certain links to stay within the site as I see fit.

    Here's an example of what it looks like now: column_link="http://websitename.com"]

    I attempted to just do a quick HTML fix by adding the following, but that just caused the column to no longer be clickable. Perhaps i am doing it wrong? Either way can you please help me. This is what I tried changing it to:

    <a href="www.example.com/example.html" target="_blank">link text</a>

  •  8,999
    Tahir replied

    Hey ,

    Try placing this JS script in a RAW JS Page element within the <script> tags on that particular page.

    <script type="text/javascript"> 
    jQuery( document ).ready(function() {
    jQuery(".column-link").attr("target", "_blank");
    }); 
    </script>
    Thanks


    ThemeNectar Support Team 

  • John replied

    Hey..sorry no luck i tried jsut as you instructed unless i made a mistake.


    <script type=\"text/javascript\"> alert(\"jQuery( document ).ready(function() {

    jQuery(\".column-link\").attr(\"target\", \"_blank\");

    });\" ); </script>


    Please let me know what else I can do

  •  8,999
    Tahir replied

    Hey,

    You have the code enclosed in the alert function where as the code provide does not have the alert function. Please remove the alert function and add the code exactly as below:

    <script type="text/javascript"> 
    jQuery( document ).ready(function() {
    jQuery(".column-link").attr("target", "_blank");
    }); 
    </script>
    

    Best.


    ThemeNectar Support Team 

  • John replied

    Ok that worked.


    Now I need a script for the Portfolio


    For example I have a Page that says Explore Locations

    Inside that is a masonary display of portfolio items. For the Explore page, instead of having individual pages for each location, we only want it to link to an external link. But we definetely need that portfoilio link to open in a new tab.


    Pleas advise which code we should enter for that


    Thank You

  •  8,999
    Tahir replied

    Hey Again,

    Simply use this option : http://prntscr.com/96hiy8 on the Portfolio project edit page .

    Best.


    ThemeNectar Support Team 

  • John replied

    Hello

    I already have that external link field filled out, but the issue is it is not opening in an external / NEW tab which is what we\'re looking to have done.

  •  8,999
    Tahir replied

    Can you provide the page url so we an have a look .

    Best.


    ThemeNectar Support Team 

  • Jaime replied

    I'm having the same issue (having the column link externally).  I tried your solution, but seeing as this is an older post it's not working for me.  Please help.

    <script type="text/javascript"> 
    jQuery( document ).ready(function() {
    jQuery(".column-link").attr("target", "_blank");
    }); 
    </script>
  •  8,999
    Tahir replied

    Ticksy seems to have messed up code with slashes .Here is the Correct Code :

    <script type="text/javascript"> 
    jQuery( document ).ready(function() {
    jQuery(".column-link").attr("target", "_blank");
    }); 
    </script>

    Thanks 


    ThemeNectar Support Team