Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module talk:Clade/hidden

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Clade/hidden/doc)
Latest comment: 3 years ago by Jts1882 in topic Accepting values for "expanded"

Accepting values for "expanded"

[edit]

Currently if the parameter 'expanded' is used it is always set to true, even if 'expanded=false' is used.

Might be better to change:

local initialState = mw.getCurrentFrame():getParent().args['expanded']

to:

local initialState = mw.getCurrentFrame():getParent().args['expanded']

if mw.getCurrentFrame():getParent().args['expanded'] == "true" then

initialState = true

else

initialState = false

end

or something similar. Southernants (talk) 22:13, 21 May 2023 (UTC)Reply

 Done @Southernants: I wrote the code to use expanded as a flag, i.e. any value or empty parameter would set the initial stated expanded. However, the documentation didn't reflect this. It now takes true or yes to set the initial state. —  Jts1882 | talk  08:11, 22 May 2023 (UTC)Reply