Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #13921

    I’d like my callouts to open in a new page. Is there an easy way to modify this?

    Thanks!

    #81263

    Hello,

    Please open includes > helper-slideshow.php and look for this code.

    if($button) $button = "<a class='avia-button on-primary-color primary-background primary-border caption-slideshow-button $nextSlide ".$key."class' href='$button' title='' >".$slide[$key.'title']."</a>";

    Replace it with

    if($button) $button = "<a class='avia-button on-primary-color primary-background primary-border caption-slideshow-button $nextSlide ".$key."class' href='$button' title='' target='_blank'>".$slide[$key.'title']."</a>";

    Reload page and see if it works.

    Regards,

    Ismael

    #81264

    Unfortunately that one didn’t work. It looks like this code had something to do with the banner? I actually want to change the buttons on the Text Area / Callout / Quotes element (specifically the callout button) that you can add within template builder.

    Thanks!

    #81265

    If the callout links link to external websites you can use following js code – add it to the bottom of js/avia.js:

    jQuery(".callout a").filter(function() {
    return this.hostname && this.hostname !== location.hostname;
    }).attr('target', '_blank');

    #81266

    I have two sets of callouts. One on every page that links to an internal page (same one) and on the front page I have 1 link to an external site. How should I handle it in that situation?

    Thanks!

    – John

    #81267

    The script I posted above will compare the domain/hostname of the current websitewith the link url domain. If it’s different and external (eg because you link to google.com) then it will open the link in a new tab/window. Otherwise the link (which is internal) will open in the same tab/window.

    #81268

    I’ve tried adding this js code and it’s not working. I am building the site in a subdirectory. Would that have any impact?

    Link: http://growth-engine.org/newsite/?page_id=1211

    #81269

    Hey!

    No – my mistake – add it to the top of avia.js below following line:

    jQuery(document).ready(function(){

    Regards,

    Peter

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘How can I make a callout open in a new page?’ is closed to new replies.