Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ..."Open Link In New Browser Window?" option in DNN7"Open Link In New Browser Window?" option in DNN7
Previous
 
Next
New Post
12/3/2015 2:31 PM
 
the crucial word is j a v a s c r i p t : in front of void
 
New Post
12/3/2015 2:59 PM
 
michael hamlett wrote:
ok. let me summarize all this thread mumbo jumbo for all you newbies like me who simply want to know how to code a page to point to a URL and open in another window. forget the threads that want to know why would you ever do that? thats ridculous. there are numerous reasons to want to open a new tab. so forget that thread. forget the thread that says its fixed in 7.2 . it aint. i am on 7.4 and it does not work. now granted i have custom skin created by a consultant that may have just screwed up and did not do something right. im not using the default gravity skin, but again who is.

the first threads that try to tell you how to open a page in a new window were partially correct. however they make too many assumptions about javascript and leave out the necessary code to make the URL open properly in a new tab. so for you people who try to answer questions. if you arent going to include ALL the code to make something work, then dont waste your time or mine by short code snippets that assume everyone has been coding for 10 years.

the correct code is....
void(window.open('http://www.mysite.com'))

for some reason they leave out the part.
this works on 7.4
you cannot substitute in a token either. i tried.

if this sounds snippy, it is. im tired of code snippets that dont work and guys who answer questions that are too lazy to put exact working code in their answers.

The skinner needs to add support for "open in new window" in the menu template. If he/she didn't it will not work, whatever you set in the admin interface.
You might be new to DNN, but the person that asked the original question is asking about support in DDR menu, which made us assume that he knows about DDR menu templates.

 
New Post
12/5/2015 10:43 PM
 
As Timo has noted, this is a fairly simple fix to the menu templaes. The comment by FMC is to the point:

"The template files you're using have to be updated to include the Target attribute of the node you're rendering.

Token template - [=TEXT]

Razor template - @node.Text

If the page has a "Open in new window" checked it'll add target="_new" to the link, else it leaves it an empty string and doesn't render the target attribute at all."

It's quite easy to open the template file for the menu, and make the change. But it would also be nice to fix that "standard" templates that are provided with the DDR menu. IIt is also possible to use the DumpXML template if you want to see what is actually provided to the DDR remplates. You can add a DDR module to a page, specify the DumpXML template and stare at everything that is there -- and there's a lot more than is used by the standard templates, too. See http://www.dnnsoftware.com/wiki/ddrme... for more details.

Now ... I have a question about the use of target="_new" versus target="blank". I sometimes have sites that don't open new window for _new, but always to for _blank. Would it make sense to request that DDR use _blank instead of _new? If not can someone explain how _new works (I don't completely understand what I've Googled, hence this question).



Joe Craig
Patapsco Research Group, Ellicott City, MD
DotNetNuke Development and Services (http://patapscorg.com)
 
New Post
12/6/2015 4:39 AM
 
AFAIK, "_new" means a new browser tab (which is not supported by all Browsers), where "_blank" means a new window (still opened as new tab in some Browsers, depending on ist configuration)

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
12/7/2015 4:01 AM
 
Sebastian Leupold wrote:
AFAIK, "_new" means a new browser tab (which is not supported by all Browsers), where "_blank" means a new window (still opened as new tab in some Browsers, depending on ist configuration)

 I think _new does not exist, but most browsers open en new tab when you use any word that's not supported for the target (sdfgertsrt would work too).
You are supposed to use _blank

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ..."Open Link In New Browser Window?" option in DNN7"Open Link In New Browser Window?" option in DNN7


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out