Squeak SmallWiki prototype - external links
renggli at iam.unibe.ch
Wed Apr 27 18:07:35 MEST 2005
>>> I saw the external link marker on the Squeak SmallWiki prototype; I
>>> saw that they're css based in wikipedia - does the prototype
>>> implement them the same way, and if yes, what do I have to alter to
>>> use them in my own wiki?
>> I checked this site, but I don't understand what you mean with the
>> external link marker?
> Well, as far as I understand, external links (those created with
> *link>http://target/*) are known to the structure as being external.
> So, I'd like to alter the class on external links - like
> *Seaside>http://www.seaside.st/* expands to
> <a class="external" target="_blank"
> The question is, where is the right place in the code to do that? Or
> is it a preference I have not yet found?
Ahh, I see the point.
If you want the target to be _blank for all the external links you
could add the following method:
stream attributeAt: 'target' put: '_blank'.
super acceptLinkExternal: aLink.
If you want this attribute to be set just for a few external links
either use HTML in these cases or add a property to LinkExternal and
update the classes WikiParser, WikiScanner, VisitorRendererWiki and
More information about the SmallWiki