Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #184998

    Fullwidth Masonry Gallery … open custom link in a new window/tab possible ?

    an option to allow an opening in a new window/tab would be great.

    #185443

    Hey pixelmixture!

    I’m not sure if it is possible but you can choose to open the link on a new tab. Edit config-templatebuilder > avia-shortcodes > masonry_entries.php, find this code:

    //set the html tags. depending on the link settings use either an a tag or a div tag
    				if(!empty($this->atts['container_links']) || !empty($custom_url))
    				{
    					$this->loop[$key]['html_tags'] = array('a href="'.$this->loop[$key]['url'].'"','a'); //opening and closing tag for the masonry container
    				}
    				else
    				{
    					$this->loop[$key]['html_tags'] = array('div','div');
    				}

    Replace it with:

    //set the html tags. depending on the link settings use either an a tag or a div tag
    				if(!empty($this->atts['container_links']) || !empty($custom_url))
    				{
    					$this->loop[$key]['html_tags'] = array('a target="_blank" href="'.$this->loop[$key]['url'].'"','a'); //opening and closing tag for the masonry container
    				}
    				else
    				{
    					$this->loop[$key]['html_tags'] = array('div','div');
    				}

    Remove browser cache then reload the page.

    Cheers!
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Fullwidth Masonry Gallery … open custom link in a new window/tab possible ?’ is closed to new replies.