Question
Hi. I am including a user's
WikiName on various pages, and would like it to be autolinked even if I don't prefix it with "Main."
Is this possible? Does anyone know how I could tweak the code to make this happen?
Also, any reason NOT to do this?!!
Thanks!
David
.
- TWiki version: TWiki20010901
- Web server: Apache
- Server OS: NT
- Web browser: IE
- Client OS: 2000
--
DavidHay - 11 Mar 2002
Answer
Strange, strange... It is not possible AFAIK. It never failed for me. Does page with user's wikiname exist? DOes Main web exist? Can you post here example: line from your page with user's wikiname which does not link?
--
PeterMasiar - 12 Mar 2002
.
Re: "Is this possible? Does anyone know how I could tweak the code to make this happen?"
AFAIK, it's possible with ugly workarounds or a lot of work, like:
- Put all your content in the Main web (you don't need the prefix for the "current" web)
- Modify the TWiki code
"Also, any reason NOT to do this?!!"
Mainly the above. What are you trying to accomplish? Is it just to save some typing, or something else?
One thing that may help is including the name on the
WebTopicEditTemplate, either with a specific user name or the %WIKIUSERNAME% variable which will show the name of the current editor. See
Wikilearn.WebTopicEditTemplate where I include several things like a TOC, <verbatim> tags, etc. for cut and paste at least while creating the original page.
--
RandyKramer - 12 Mar 2002
Should be possible using
Plugins.FindElsewherePlugin, just put 'Main' in the list of webs to search for 'find elsewhere' (a bit like the PATH on Windows or Unix).
It's not a bad idea to do this, although the default signature would be a bit redundant - it would also mean that existing topics would not need revision if the users' home pages move out of the Main web (e.g. to Users) in the future.
--
RichardDonkin - 13 Mar 2002
UPDATE of my post above:
Sorry I messed up. I misread
even if I don't prefix it with "Main." and answered for opposite. Sure, without Main it will not work. However, check
UserWeb and
RenameMainWebToHome. Proposal is, rename web Main to User, so you will write User.WikiName. And this makes sense, right? And you can (almost) do it now, see
TWikiAdminCookBook.
--
PeterMasiar - 13 Mar 2002