• Anonymous
  • Login
  • Register
DominoWiki - Feature Request: Non CamelCase links with alternative text


Sometimes we have found it handy to be able to link to a non-CamelCase document, using an alternative text link. This can be handy for options such as "more...." style links.

For example, this can be implemented using this Wiki text:

[[wiki:wiki page name **alternative text**]]

Additional html will need to be added to the tips.html file to describe this to users, e.g.:

<code>[[wiki:your wiki page name **alternative text**]]</code> is used for a non-CamelCase wiki page link, with alternative display text. Note that ** are required<br/>


To implement this, replace the convertDoubleBracket function in WikiPage.class

Public Function convertDoubleBracket (txt As String) As String
'** special double-bracket cases:
'** [[wiki page name]] is a non-CamelCase wiki link
'** [[wiki:wiki page name **alternative text**]] is a non-CamelCase wiki link
Dim newText As String
Dim linkText As String
Dim displayText As String

If Instr(1, txt, "wiki:", 5) = 1 Then
'strip out "wiki:"
newText = Mid(txt, 6)

'strip out **
displayText = Trim(Strleft(Strright(newText, "**"), "**"))
newText = Strleft(newText, "**")

'** replace spaces with underscores
newText = Replace(Fulltrim(newText), " ", "_")
'** remove any brackets that may have snuck in there
newText = Replace(newText, "[", "")
'** get rid of any HTML tags we might have inadvertantly inserted
newText = ReplaceRangeEnds(newText, "<", ">", "", "", "*", True)
'** make sure the first letter is uppercase
newText = Ucase(Mid(newText, 1, 1)) & Mid(newText, 2)

newText = getWikiLink(newText, False)

'** and make sure that the new wiki link uses the original text
newText = replaceWikiLinkText(newText, displayText)
Else
'** replace spaces with underscores
newText = Replace(Fulltrim(txt), " ", "_")
'** remove any brackets that may have snuck in there
newText = Replace(newText, "[", "")
'** get rid of any HTML tags we might have inadvertantly inserted
newText = ReplaceRangeEnds(newText, "<", ">", "", "", "*", True)
'** make sure the first letter is uppercase
newText = Ucase(Mid(newText, 1, 1)) & Mid(newText, 2)
'** create a wiki link
newText = getWikiLink(newText, False)

'** and make sure that the new wiki link uses the original text
newText = replaceWikiLinkText(newText, txt)
End If

convertDoubleBracket = newText
End Function



Taken Actions by Owners



In this field you can enter the actual request.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.
In this field owners can describe what they have done or want to do.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.