Module talk:File link: Difference between revisions

Content deleted Content added
Colon trick: new section
Line 10:
 
I sometimes use the colon trick to have the link spelled out like <code><nowiki>[[:File:Example.png]]</nowiki></code>. (That is in talkpage and debugging mostly). Does the object provide that option? -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 08:29, 3 June 2014 (UTC)
:Not at the moment, but I have been thinking of adding it in. The question is, how should we set the display value? Using the colon trick on the code <code><nowiki>[[:File:Example.png|thumb|220px|alt=Foo|Bar]]</nowiki></code> produces an output of "[[:File:Example.png|thumb|220px|alt=Foo|Bar]]", so we will have to set the display value explicitly. How about an <code>escape</code> method with parameters {{code|obj:escape(isEscaped, display)|lua}}? The link would only be escaped if <var>isEscaped</var> was true, and <var>display</var> would set a custom display value, with the default being the full filename. Let me know what you think. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 08:50, 3 June 2014 (UTC)