[Skip to main content](#vessel-content)

#   Button that opens article view in a new window

##

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

13 years 6 months ago [\#102197](#102197) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *[Button that opens article view in a new window](/forum/2-general-talk-about-hikashop/81351-button-that-opens-article-view-in-a-new-window#102197 "I need to render a button in the bottom of my product view that it's a SELF-URL of the same article in view but to open it in a new window. My PHP is very basic.  How would be the code so when the page is rendering creates a button that onlick would open the same content in a new window?")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

I need to render a button in the bottom of my product view that it's a SELF-URL of the same article in view but to open it in a new window. My PHP is very basic.

How would be the code so when the page is rendering creates a button that onlick would open the same content in a new window?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgxMzUxLWJ1dHRvbi10aGF0LW9wZW5zLWFydGljbGUtdmlldy1pbi1hLW5ldy13aW5kb3c/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

13 years 6 months ago -  13 years 6 months ago [\#102226](#102226) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Button that opens article view in a new window](/forum/2-general-talk-about-hikashop/81351-button-that-opens-article-view-in-a-new-window#102226 "I need to render a button in the bottom of my product view that it's a SELF-URL of the same article in view but to open it in a new window. My PHP is very basic.  How would be the code so when the page is rendering creates a button that onlick would open the same content in a new window?")*

Hi,

You want to open the exact same page ?
You can use the function "hikashop_currentUrl" in order to get the current url of the page, and create a link like that: Code:

&lt;a href="&lt;?php echo hikashop_currentUrl(); ?&gt;" target="_blank"&gt;Your link&lt;/a&gt;

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Last edit: 13 years 6 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

The following user(s) said Thank You: [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgxMzUxLWJ1dHRvbi10aGF0LW9wZW5zLWFydGljbGUtdmlldy1pbi1hLW5ldy13aW5kb3c/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.042 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
