Closed Bug 722673 Opened 13 years ago Closed 9 years ago

Kuma: Scripting - support auto-import of admin-defined variables

Categories

(developer.mozilla.org Graveyard :: Editing, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: sheppy, Unassigned)

References

Details

It would be really useful to be able to have every template/script in Kuma automatically import a set of variables defined using the admin control panel. This would let us, for example, have variables that define the current Gecko release, Aurora, Beta, and Nightly versions, define values used commonly when styling content, and so forth. This would make it much easier to quickly update all our scripts that need this sort of information.
Blocks: 710728
Priority: -- → P2
Hmm, I think there's now a way to do this without involving the admin panel: kumascript should be configured by default to auto-import the template Template:MDN:Common as a module named "mdn" That means any constants defined there should be available to templates as something like `mdn.gecko_current_release` Those constants would be editable from the wiki for people with template edit permission, instead of from the admin control panel. Let's see about trying this out when bug 730705 gets closed
Depends on: 730705
Blocks: 756266
No longer blocks: 710728
Version: Kuma → unspecified
Component: Docs Platform → Editing
No longer blocks: 756266
We are using "globals" in KumaScript the way Les described it comment. MDN:Common is one module that does provide this. Nowadays other "data" macros provide even more centralized information as well.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.