Page 1 of 1
How to target the 'read more' function (news module) in new window
Posted: Wed May 23, 2007 8:10 pm
by knert
hi,
How can I target the 'read more' function into a
new window. So NOT in the same window, but a complete new window. I searched the whole forum but no answer.
I have the news module in an iframe and i want the read more function opens up in a brandnew window.
Please any help would be appreciated. ThnQ

Knert
Re: How to target the 'read more' function (news module) in new window
Posted: Wed May 23, 2007 9:18 pm
by calguy1000
This needs javascript in the link that's created, you may need custom development for this. I don't think that there's anything built-in.
Re: How to target the 'read more' function (news module) in new window
Posted: Thu May 24, 2007 7:23 am
by knert
Hm I think you're right, since on this entire forum there is no answer.
Theoratically it would be easy...in the news template there would be some kind of adjustment to open the read more funtion in a new window. But because it is impossible to target in which is the readmore function is placed, the only solution would be indeed some javascripting.
Anyone who has already managed this?

Re: How to target the 'read more' function (news module) in new window
Posted: Thu May 24, 2007 7:50 am
by robsta
I'd just dupe the template and remove the
{$entry->morelink}
and replace it with
link}" target="_blank">[ More... ]
Works for me
Re: How to target the 'read more' function (news module) in new window
Posted: Thu May 24, 2007 8:24 am
by knert
You made the theory practical!
it works !
thnx a lot!!

Re: How to target the 'read more' function (news module) in new window
Posted: Thu May 24, 2007 8:30 am
by robsta
Any time that's the power of smarty ; )
Re: How to target the 'read more' function (news module) in new window
Posted: Thu May 24, 2007 12:00 pm
by knert
Well...it's me again....
Still got problems. Not with the new window thing, but with the template stuff.
When a customer clicks on the 'read more' function he will be directed to a new window. So far so good.
But this new window has got the same template as the main window where the headline news is.
I tried everything to switch the template too.
Reason: The website I'm making has a small iframe on the frontpage. Here i place the headlines of the news. When a visitor clicks on the 'readmore' button he has to go to a new window and reads the entire news bulletin on a new template.
This I cannot figure out

Re: How to target the 'read more' function (news module) in new window
Posted: Thu May 24, 2007 7:39 pm
by alby
knert wrote:
When a customer clicks on the 'read more' function he will be directed to a new window. So far so good.
But this new window has got the same template as the main window where the headline news is.
I tried everything to switch the template too.
Add a new template specific for window.
Add a new page with this template.
Add a news tag the parameter: detailpage=alias (alias of new page)
Alby
Re: How to target the 'read more' function (news module) in new window
Posted: Fri May 25, 2007 10:50 am
by knert
Hi,
thnx for responding
The first two steps I already did. But the last step:
Add a news tag the parameter: detailpage=alias (alias of new page)
How and where do I have to do that exactly?

Re: How to target the 'read more' function (news module) in new window
Posted: Fri May 25, 2007 10:56 am
by RonnyK
In the calling of {news}, you can give a parameter "detailpage=" to have the content when clicked on to be opened in the page given in the parameter instead of the current page. If you create such a page, make sure that on the options-tab, "show in menu" is unchecked, as you don't want it to be visible in the menu, it must be active, as you want to call it.
Code: Select all
{news number='3' detailpage='news'}
opens in a page called "news".
Ronny
Re: How to target the 'read more' function (news module) in new window
Posted: Fri May 25, 2007 12:19 pm
by knert
Thank you! it fully works!
So now I have the newspage within an iframe one page A.
When clicked on the read more button it will go to a brandnew window with a different template.
This is exactly what i wanted with your help. Thank you very much.
