[11:22:43] hi, can someone help me quick? i want to put the magic word {{PAGENAME}} inside a template call, so that it it always calls the subpage of the current article as a template [11:23:08] do i just write {{{{PAGENAME}}/subpage}} ? [11:26:34] Mirghon: Yes, that will work [11:26:48] (specifically, i mean to write [11:26:49]      style="background-color:{{{{PAGENAME}}/color}} [11:26:49] or is there a neater way of doing this [11:26:50] ok thanks [11:29:23] You probably want to put a colon before the page name; {{:{{PAGENAME}}/color}} (unless you actually want to transclude that page name in the Template: namespace) [11:32:02] hmpf, doesnt seem to work even with the colon. looks like the fact that the pagename contains a colon throws him out [11:33:09] it's for a Portal:topic page [11:37:06] why doesn't {{:{{ROOTPAGENAME}}/color}} work? [12:01:22] Mirghon: If pages are on a different namespace than the main one, you'll need to use {{FULLPAGENAME}} [12:49:58] still doesn't work [12:52:00] both [12:52:00] |- style="background-color:{{:{{FULLPAGENAME}}/Color}}; color:#FFFFFF;" [12:52:01] and [12:52:01] |- style="background-color:{{{{FULLPAGENAME}}/Color}}; color:#FFFFFF;" [12:52:02] result in [12:52:02] FEC00F; color:#FFFFFF;" [12:52:03] being displayed on the page (without the color from /Color being read) [12:56:07] alright, i managed to make it work - thx [12:56:14] yw [12:57:14] It helps pasting the code outside of HTML attributes, so you can view directly on the page how it renders the value, rather than relying on how the final page looks [12:58:54] yeah, well - i just noticed that my solution makes the whole thing obsolete [13:00:27] it works if i put "color: #123456" as a variable; but then i can't access it in other parts of my page, where i need just the hexcode without the "color:" in front of it [13:04:04] the problem seems to be that my variable starts with a #, which is interpreted by mediawiki as theginning of a numbered lis [15:59:15] how do i escape multiple namespaces? [16:00:30] Can you elaborate? [16:00:41] I made a Template:Portal for the portal sites on my wiki, wherein i want to refer to the title of the current portal with  :{{PAGENAME}} [16:00:49] but that only removes the Template: [16:00:52] not the Portal: [16:01:53] what's the full title of the page? [16:02:05] well, that depends :D [16:02:17] the full title of the template is just Template:Portal [16:02:42] but when its deployed specifically, im in Portal:Topic [16:03:13] which is also what it gives out when i use {{FULLPAGENAME}} [16:03:39] Well, MediaWiki doesn't have the concept of multiple/nested namespaces [16:03:53] or, to be exact, :{{FULLPAGENAME}} (i already use one colon to get that) [16:04:04] Just using a : in a title, doesn't mean it's a NS as MW understands [16:05:09] so what's the solution here [16:06:10] i can't refer to Topic in any way, only to Portal:Topic? [16:07:35] You could write/copy a Lua/Scribunto module to do string parsing (splitting on : and stuff) [16:08:16] or define a Portal namespace in the wiki configuration [16:08:38] would that be doable for someone who has never coded in Lua? (i coded other languages) [16:08:56] I'm pretty sure one will already exist on the english wikipedia :P [16:09:22] yeah, i prefer writing it myself...then i dont have to credit sources and shit :D [16:10:01] https://www.mediawiki.org/wiki/Module:String#sub [16:12:54] something like https://en.wikipedia.org/wiki/Template:Remove_first_word (which uses Module:String as well) would also work [16:14:46] or https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#mw.text.split [16:19:14] thx I'll look into it [16:57:21] is it possible that i need to do something specific before i can start creating modules? [16:57:46] i get MWErrorExceptions [16:58:16] You'll need the right extension and setup, yeah... [16:58:23] !e Scribunto [16:58:23] https://www.mediawiki.org/wiki/Extension:Scribunto [16:58:29] have scribunto [16:58:32] its not that [16:58:42] have parserfunctions as well [16:59:00] !debug [16:59:00] For information on debugging (including viewing errors), see https://mediawiki.org/wiki/Manual:How_to_debug . A list of related configuration variables is at https://mediawiki.org/wiki/Manual:Configuration_settings#Debug.2Flogging Also see https://mediawiki.org/wiki/Manual:Errors_and_symptoms