[Pmwiki-users] Anchors and links

John Rankin john.rankin
Sun Aug 3 16:51:32 CDT 2003


The reference to "ThisPage:" is a reference to an intermap link -- "ThisPage:" gets translated into the URL of the current page.

So instead of typing WikiSandbox:#myanchor type ThisPage:#myanchor

Incidentally, I have problems with this syntax in some browsers -- some browsers jump directly to the anchor, other browsers recreate the page before jumping to the anchor. I think maybe if the reference is on the current page it ought to be producing <a href='#myanchor'> instead of the full URL reference.

Also, to be XHTML compliant, does it need to be <a name='myanchor' id='myanchor'></a> ?

I agree that WikiWord#anchor is more natural to write and is easier to read in editing mode. I'm not sure why free links are a problem, I'd expect to write:

  {{free link}}#anchor and {{free link}}s#anchor

Regards
-- 
John Rankin

On Sunday, 3 August 2003 5:25 AM, Russell Cook <rcook at rcook.net> wrote:
Thanks for the response Patrick.  I had tried that syntax.  Below is what I
entered into my Sandbox, and the HTML that PmWiki produced (minus my site
url).  What am I doing wrong?  This seems rather simple.  :)

And using [[WikiSandbox:#myanchor]] does not change the behavior.

Russell

============================

WikiSandbox:#myanchor

----

[[#myanchor]]

============================

<p /><a href='http://(siteurl
here)/wiki/pmwiki.php/Main/WikiSandbox'>WikiSandbox</a>:#myanchor
<p /><hr />
<p /><a name='myanchor'></a>

============================

-----Original Message-----
From: Patrick R. Michaud [mailto:pmichaud at pobox.com]
Sent: Saturday, August 02, 2003 12:22 PM
To: Russell Cook
Cc: Pmwiki-users at pmichaud.com
Subject: Re: [Pmwiki-users] Anchors and links


Woops, I made the same darn mistake again!

Reference to another page in another group:
   ThisWiki:/SomeGroup/SomePage#myanchor

(note leading slash)

Pm


On Sat, Aug 02, 2003 at 11:11:19AM -0600, Patrick R. Michaud wrote:
> On Sat, Aug 02, 2003 at 12:03:28PM -0500, Russell Cook wrote:
> > Does anyone have a working example of an anchor tag and the reference
within
> > the same page?  I've tried every example I found in the old list
archives
> > and searched the documentation and have not been able to get anything to
> > work.  I think the anchor is fine, but the source link is giving me
> > problems.
>
> Tag:  [[#myanchor]]
>
> Reference in same page:  ThisPage:#myanchor
>
> Reference to another page in same group:  ThisGroup:SomePage#myanchor
>
> Reference to another page in another group:
>    ThisWiki:SomeGroup.SomePage#myanchor
>
> --------
>
> On a related note, since this is becoming a fairly common question, is
> anyone interested in adding anchor tags to the WikiWord syntax?
> Thus we could have SomePage#myanchortag, and
> SomeGroup/SomePage#myanchortag.  I'm not sure what the syntax would
> be for FreeLinks--easiest might be to leave it unsupported.
>
> Comments?  Commendations?  Objections?
>
> Pm
>
> _______________________________________________
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com



_______________________________________________
Pmwiki-users mailing list
Pmwiki-users at pmichaud.com
http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com






More information about the pmwiki-users mailing list