Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Wikibase-navigation
Create a new Item
Create a new Property
Query Service
Item by title
wikibase
Search
Search
English
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:ChapterLayout
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Page information
In other projects
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local p = {} local mw = mw function p.render(frame) local parent_args = frame:getParent().args local content = parent_args[1] or "" local item = parent_args.item -- Retrieve Wikibase data if item is provided local entity = nil if item and item ~= "" then entity = mw.wikibase.getEntity(item) end -- 1. ChapterNav local nav_args = {item = item or ""} if entity then -- Pass any relevant data to ChapterNav nav_args.entity = entity end local nav = frame:expandTemplate{ title = 'ChapterNav', args = nav_args } -- 2. ChapterSynopsis local synopsis_args = {item = item or ""} if entity then synopsis_args.entity = entity end local synopsis = frame:expandTemplate{ title = 'ChapterSynopsis', args = synopsis_args } -- 3. ChapterContributors local contributors_args = {item = item or ""} if entity then contributors_args.entity = entity end local contributors = frame:expandTemplate{ title = 'ChapterContributors', args = contributors_args } -- 4. ChapterCitation local citation_args = {item = item or ""} if entity then citation_args.entity = entity end local citation = frame:expandTemplate{ title = 'ChapterCitation', args = citation_args } -- 5. Main content (imported text) local main_content = mw.text.trim(content) -- Assemble the page structure return nav .. "\n\n" .. synopsis .. "\n\n" .. contributors .. "\n\n" .. citation .. "\n\n" .. main_content end return p
Summary:
Please note that all contributions to wikibase may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Wikibase:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Page included on this page:
Module:ChapterLayout/doc
(
edit
)
Search
Search
Editing
Module:ChapterLayout
Add languages
Add topic