[Pmwiki-users] More on attachments

Patrick R. Michaud pmichaud at sci.tamucc.edu
Tue Nov 19 13:33:33 CST 2002


On Tue, 19 Nov 2002, Glenn Blalock wrote:

> Pm asks:
> > So, anyone want to take a stab at where attachment listings 
> > should be displayed and what they should look like?  Remember 
> > to keep it relatively simple and straightforward if possible!
> 
> As a user, I would want to see a list of possible attachments when I
> have an edit page open.  I'd like to see a link next to "text
> formatting" guidelines that opens *a separate window* with the list of
> attachments.  

This is along the lines of what I was thinking.  Actually, most browsers
already allow pages to be opened in separate windows--just right-click
on a link and then select "Open Link in New Window" or whatever the
browser's equivalent is.

> (Confession: I'm being a bit selfish in this suggestion.  I've been
> hankering for a way to make a url open in a new window, but don't have
> the ability to produce the code that might make it happen.)

Actually, this suggestion has come up several times now from a variety
of users.  All I need is a good markup sequence in order to implement
it.  There are a few user-perspective questions to be answered, however,
which needs a little bit of background on how HTML says to open pages
in new windows.

HTML makes use of the "target" attribute of <a...> tags in order decide
which window to open a link in.  If there is no target attribute, then the
link is opened within the current page.  If the target attribute names a
window that doesn't exist, then a new window is created and the link is
opened there.  If the target attribute names a window that already exists,
the link is opened in the already existing window.

Thus, if we have a "open link in new window" capability for PmWiki:
  1.  Should every "new window" link cause a separate new window to be
      opened, or can the same window from a previous "new window" link be
      reused?
  2.  Is it important for the wiki author to be able to specify specific
      target windows for individual links?

If #2 is not that important, then the markup can be something fairly
simple.  For example, we could do something like
	[[#http://www.pmichaud.com/toast Pop-Tarts]]
where the '#' in front of the http means the link should opened in
a new window.  If it's important for wiki authors to be able to control
the names of new windows that are created and reuse them, then the markup
gets more tricky and would need to be something like
	[[http://www.pmichaud.com/toast #newwindow# Pop-Tarts]]
or
	[#http://www.pmichaud.com/toast newwindow Pop-Tarts#]

I'm just using the '#' character here for example--it can be almost
any character and ought to be something a wee bit more intuitive if
possible.

Suggestions welcome.

Pm





More information about the pmwiki-users mailing list