How to open Portfolio articles in new window/tab
Recently, we received some questions about "how to open portfolio articles in new tab" because Portfolio articles are now set to display on the same page as default style. It is also worth noting that users can force a link to open in a new window/tab by [Meta Key]-just clicking a link. However, this can still make readers less comfortable to view articles anyway.
As a result, we'd like to guide you a simple trick that helps to get rid off this default viewing style. Just follow this path to find the needed file to start modifying: components\com_tz_portfolio_plus\views\portfolio\tmpl\default_item.phpBy addressing \default_item.php file, you can navigate and add target="_blank" in the first section before > of <a tag. Please modify at these lines as below:
Lines 111-113: This is to change direction to new tab when clicking into article's title
<a href="<?php echo $item ->link; ?>" target="_blank" itemprop="url"> <?php echo $this->escape($item -> title); ?> </a>
Lines 257-259: This is to change direction to new tab when clicking on "Read more" button
<a class="btn btn-primary TzPortfolioReadmore" href="<?php echo $item ->link; ?>"target="_blank"> <?php echo JText::sprintf('COM_TZ_PORTFOLIO_PLUS_READ_MORE'); ?> </a>
That's all. I hope this helped clear up the questions and understand how to force portfolio articles to open in a different page.
Our Partner’s Templates
TZ Portfolio is working perfectly with JoomTd templates.
Buy our bundle and get 20% OFF from their template.