summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-07-25 18:38:18 +0200
committerWuzzy <almikes@aol.com>2016-07-25 18:39:15 +0200
commitca02fd1b0cf4c38621aa4a44feddf688554ae090 (patch)
treeffa25650e56a1fe67cee61b85fa8e2abb5a8bdf3 /init.lua
parent1f0680803b6e93b7958f7743b4dcf0f5e17af90b (diff)
Add single alias function
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 80d510d..233019b 100644
--- a/init.lua
+++ b/init.lua
@@ -90,6 +90,11 @@ function doc.add_entry_aliases(category_id, entry_id, aliases)
end
end
+-- Same as above, but only adds one alias
+function doc.add_entry_alias(category_id, entry_id, alias)
+ doc.data.categories[category_id].entry_aliases[alias] = entry_id
+end
+
--[[ Functions for internal use ]]
function doc.formspec_core(tab)