User talk:Iritscen/TestSpace: Difference between revisions
Jump to navigation
Jump to search
Paradox-01 (talk | contribs) m (sig) |
No edit summary |
||
Line 1: | Line 1: | ||
So what's the magic with that code? Why not plain text like "chr_has_lsi (ai_name or script_id);" [[User:Paradox-01|paradox-01]] ([[User talk:Paradox-01|talk]]) 19:29, 19 November 2015 (CET) | So what's the magic with that code? Why not plain text like "chr_has_lsi (ai_name or script_id);" [[User:Paradox-01|paradox-01]] ([[User talk:Paradox-01|talk]]) 19:29, 19 November 2015 (CET) | ||
:The minor reason is that using a template allows us to style the function information however we want, and change it for all functions in the future. It would be a pain to arrange this layout of information without a template, and I don't think the old way of listing functions on BSL:Functions is easy to read. One additional thing that the template does is set up an HTML anchor for that command, which will allow the creation of those redirect pages that geyser always wanted. So, for instance, "ai2_allpassive" will be a redirect to <nowiki>[[BSL:AI activity#ai2_allpassive]]</nowiki>. | |||
:The major reason is that I am trying to automate the building of tables of functions/variables, and templates can help with that by providing markup for selective transclusion. There will be one table at the top of each "grouped page" (like [[BSL:Inventory]]) listing the functions and variables found on that page, as well as a master table of all funcs/vars on a new page called BSL:Reference (replacing BSL:Functions and BSL:Variables). If these tables are built using transclusion, then they will automatically update themselves any time a change is made to a BSL command on a grouped page. However, I'm not sure yet if the function template can be used to automatically build both those tables. It's possible, but it requires self-transclusion, which has some tricky aspects to it. I am still experimenting with that part. At the very least, the master table on Reference will be built automatically from the info on the grouped pages. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 16:42, 21 November 2015 (CET) |
Revision as of 15:42, 21 November 2015
So what's the magic with that code? Why not plain text like "chr_has_lsi (ai_name or script_id);" paradox-01 (talk) 19:29, 19 November 2015 (CET)
- The minor reason is that using a template allows us to style the function information however we want, and change it for all functions in the future. It would be a pain to arrange this layout of information without a template, and I don't think the old way of listing functions on BSL:Functions is easy to read. One additional thing that the template does is set up an HTML anchor for that command, which will allow the creation of those redirect pages that geyser always wanted. So, for instance, "ai2_allpassive" will be a redirect to [[BSL:AI activity#ai2_allpassive]].
- The major reason is that I am trying to automate the building of tables of functions/variables, and templates can help with that by providing markup for selective transclusion. There will be one table at the top of each "grouped page" (like BSL:Inventory) listing the functions and variables found on that page, as well as a master table of all funcs/vars on a new page called BSL:Reference (replacing BSL:Functions and BSL:Variables). If these tables are built using transclusion, then they will automatically update themselves any time a change is made to a BSL command on a grouped page. However, I'm not sure yet if the function template can be used to automatically build both those tables. It's possible, but it requires self-transclusion, which has some tricky aspects to it. I am still experimenting with that part. At the very least, the master table on Reference will be built automatically from the info on the grouped pages. --Iritscen (talk) 16:42, 21 November 2015 (CET)