Re: [Tiki-users] How to open link in a new window?
Rick Sapir <[email protected]> Thu, 14 Jul 2022 14:58:49 -0400
| Newsgroups | gmane.comp.cms.tiki.user |
|---|---|
| Message-ID | <[email protected]> |
>> For example, searching for "new window" will help you find the "Open
>> external links in new window" option on the Text Area control panel.
> And that's what happened when I tried. But what confuses me, is that there
> is no "Text Area" (or "Textarea") control panel. So where does the
> "textarea" link send me?
I believe it is actually labeled (in English, at least) as: "Editing and
plugins"
tiki-admin.php?page=textarea
> Okay. That's what I wanted to know.
>
> I think I don't want to do it like this, because the links would become
> dependent on the host name. And I also would like to prefer internal links,
> because they are renamed automatically when the linked page is renamed. And
> external links require at least the web server's Tiki root directory to be
> specified (like "tiki"). And there might be more reasons for prefering
> internal links. Alas, internal links don't support any links arguments at
> all.
>
>
I agree that internal links are much more preferable. One possible
workaround, could be to use a "regular" internal link + JQ. You could do
something like, create your link in wiki syntax:
{DIV(class="myclass")}((Link to a page)){DIV}
And then use something like this in a JQ plugin:
{JQ()}
$('.myclass a').click( function() {
window.open( $(this).attr('href') );
return false;
});
{JQ}
(Note, this is just quasi-code -- YMMV)
You could even put the JQ within a module, then simply add the module to
any page in which you want the links to open in a new window.
-R
Rick Sapir
ricksapir.com
@ricksapir
Creating Content -- Managing Information
_______________________________________________
TikiWiki-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-users