Template:CreateLikeThis: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
Line 4: Line 4:
== Usage ==
== Usage ==
The template needs the portal inforamtion to be passed in order to get the relevant attributes:
The template needs the portal inforamtion to be passed in order to get the relevant attributes:
<pre>{{CreateLikeThis
<pre class="ltr">{{CreateLikeThis
|form=Form name (required)
|form=Form name (required)
|template=if null gets form name value
|template=if null gets form name value
Line 19: Line 19:


=== Example ===
=== Example ===
<pre>{{CreateLikeThis
<pre class="ltr">{{CreateLikeThis
|form=Contact
|form=Contact
|namespace=User
|namespace=User
Line 37: Line 37:
|secondary-field-value=JustLogo.svg
|secondary-field-value=JustLogo.svg
}}
}}
</noinclude><includeonly>{{#vardefine:count|{{#counter:createmodal}}}}{{#tag:btn|<nowiki> </nowiki>{{:mediawiki:Create-like}}{{PAGENAME}}|data-toggle="modal"|data-target="#createpage{{#var:count}}"|class="fal fa-plus fa-only-child fox-btn btn-purple-b"}}<div class="modal fade" id="createpage{{#var:count}}" tabindex="-1" role="dialog" aria-labelledby="createPageModal{{#var:count}}" aria-hidden="true">
</noinclude><includeonly>{{#vardefine:count|{{#counter:createmodal}}}}{{#tag:btn|<nowiki> </nowiki>{{{placeholder|{{:mediawiki:Create-like}}{{PAGENAME}}}}}|data-toggle="modal"|data-target="#createpage{{#var:count}}"|class="fal fa-plus fa-only-child fox-btn btn-purple-b"}}<div class="modal fade" id="createpage{{#var:count}}" tabindex="-1" role="dialog" aria-labelledby="createPageModal{{#var:count}}" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-content">
Line 47: Line 47:
}}{{#if:{{{secondary-field|}}}|&{{lcfirst:{{{secondary-template|{{{template|{{{form}}}}}}}}}}}[{{{secondary-field}}}]={{{secondary-field-value}}}
}}{{#if:{{{secondary-field|}}}|&{{lcfirst:{{{secondary-template|{{{template|{{{form}}}}}}}}}}}[{{{secondary-field}}}]={{{secondary-field-value}}}
}}{{#if:{{{third-field|}}}|&{{{third-template|{{lcfirst:{{{template|{{{form}}}}}}}}}}}[{{{third-field}}}]={{{third-field-value}}}
}}{{#if:{{{third-field|}}}|&{{{third-template|{{lcfirst:{{{template|{{{form}}}}}}}}}}}[{{{third-field}}}]={{{third-field-value}}}
}} }}|placeholder={{:mediawiki:Create-like-page}}{{PAGENAME}} {{#if:{{{main-field-value|}}}|{{:mediawiki:Create-like-tags}}: {{{main-field-value}}} {{#if:{{{secondary-field-value|}}}|, {{{secondary-field-value}}}|}}{{#if:{{{third-field-value|}}}|, {{{third-field-value}}}|}}|}}|namespace={{NAMESPACE}}}}
}} }}|placeholde={{{placeholder|{{:mediawiki:Create-like-page}}}{{PAGENAME}} {{#if:{{{main-field-value|}}}}}|{{:mediawiki:Create-like-tags}}: {{{main-field-value}}} {{#if:{{{secondary-field-value|}}}|, {{{secondary-field-value}}}|}}{{#if:{{{third-field-value|}}}|, {{{third-field-value}}}|}}|}}|namespace={{NAMESPACE}}}}
</div>
</div>
<div class="modal-footer">
<div class="modal-footer">

Latest revision as of 13:24, 30 October 2022

Template for quickly creating more pages like the dynamic portal you're in:

Usage

The template needs the portal inforamtion to be passed in order to get the relevant attributes:

{{CreateLikeThis
|form=Form name (required)
|template=if null gets form name value
|namespace=defaults for other NS that that of the existing page
|main-field=(required)
|main-field-value=(required)
|secondary-template=if null gets main template
|secondary-field=optional
|secondary-field-value=optional
|third-template=if null gets main template
|third-field=optional
|third-field-value=optional
}}

Example

{{CreateLikeThis
|form=Contact
|namespace=User
|main-field=field_company
|main-field-value=openfox
|secondary-field=field_avatar
|secondary-field-value=JustLogo.svg
}}

Result

<btn data-toggle="modal" data-target="#createpage1" class="fal fa-plus fa-only-child fox-btn btn-purple-b"> Create more pages in CreateLikeThis</btn>


No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
formform

no description

Unknownoptional
default valuedefault value

no description

Unknownoptional
templatetemplate

no description

Unknownoptional
main-fieldmain-field

no description

Unknownoptional
main-field-valuemain-field-value

no description

Unknownoptional
secondary-fieldsecondary-field

no description

Unknownoptional
secondary-templatesecondary-template

no description

Unknownoptional
secondary-field-valuesecondary-field-value

no description

Unknownoptional
third-fieldthird-field

no description

Unknownoptional
third-templatethird-template

no description

Unknownoptional
third-field-valuethird-field-value

no description

Unknownoptional