Template:Cite web: Difference between revisions

From WikiMD's Wellness Encyclopedia

No edit summary
No edit summary
 
Line 1: Line 1:
<includeonly>
<includeonly>
{{#if:{{{title|}}} | <!-- Ensure a title is provided -->
<span class="citation">
  '''{{{title}}}''' {{#if:{{{url|}}}|[{{{url}}} Full text]}}, <!-- Add title and optional URL -->
{{#if:{{{author|{{{last|}}}}}}|{{#if:{{{last|}}}|{{{last}}}{{#if:{{{first|}}}|, {{{first}}}}}|{{{author}}}}}. }}<!-- Author or Last/First -->
  {{#if:{{{author|}}}|{{{author}}}, }} <!-- Add author -->
''{{{title}}}''{{#if:{{{url|}}}| ([{{{url}}} link])}}.<!-- Title and optional URL -->
  {{#if:{{{last|}}}|{{{last}}}{{#if:{{{first|}}}|, {{{first}}}}}, }} <!-- Combine 'last' and 'first' -->
{{#if:{{{website|}}|''{{{website}}}''. }}<!-- Website -->
  {{#if:{{{website|}}}|''{{{website}}}''}}, <!-- Add the name of the website -->
{{#if:{{{publisher|}}}|{{{publisher}}}. }}<!-- Publisher -->
  {{#if:{{{publisher|}}}|{{{publisher}}}, }} <!-- Add the publisher -->
{{#if:{{{date|}}}|{{{date}}}. }}<!-- Date -->
  {{#if:{{{date|}}}|{{{date}}}, }} <!-- Add the publication date -->
{{#if:{{{location|}}}|{{{location}}}. }}<!-- Location -->
  {{#if:{{{location|}}}|{{{location}}}, }} <!-- Add the location -->
{{#if:{{{access-date|}}}|Accessed {{{access-date}}}.}}<!-- Access date -->
  {{#if:{{{access-date|}}}|Accessed on: {{{access-date}}}. }} <!-- Add access date -->
</span>
}}
</includeonly>
</includeonly><noinclude>
 
<noinclude>
== Documentation ==
== Documentation ==
This template is used to cite web pages. It dynamically formats citations based on the parameters provided.
This template is used to cite web pages simply without Lua.
 
=== Parameters ===
=== Parameters ===
* '''title''' – Title of the web page (required).
* '''title''' – Title of the web page (required).
* '''author''' – Primary author(s).
* '''author''' – Author name(s) (alternative to first/last).
* '''first''' – First name(s) of the author(s).
* '''first''' – First name(s) of the author.
* '''last''' – Last name(s) of the author(s).
* '''last''' – Last name(s) of the author.
* '''website''' – Name of the website.
* '''website''' – Name of the website.
* '''publisher''' – Publisher of the website.
* '''publisher''' – Publisher of the site.
* '''date''' – Publication date of the web page.
* '''date''' – Publication date.
* '''location''' – Location of the publisher or content.
* '''location''' – Location of publisher.
* '''url''' – URL to the web page (required for an online citation).
* '''url''' – Web page URL.
* '''access-date''' – Date the web page was accessed online.
* '''access-date''' – Date accessed.
 
=== Example Usage ===
=== Example Usage ===
<pre>
{{Cite web
{{Cite web
  | title = The Future of Renewable Energy
  | title = The Future of Renewable Energy
Line 35: Line 39:
  | access-date = 2023-09-01
  | access-date = 2023-09-01
}}
}}
</pre>
=== Result ===
* Jane Doe. ''The Future of Renewable Energy'' ([https://example.com/renewable-energy link]). ''Green Insights''. Eco Media. 2023-08-01. London, UK. Accessed 2023-09-01.
</noinclude>
</noinclude>

Latest revision as of 05:11, 28 April 2025


Documentation[edit]

This template is used to cite web pages simply without Lua.

Parameters[edit]

  • title – Title of the web page (required).
  • author – Author name(s) (alternative to first/last).
  • first – First name(s) of the author.
  • last – Last name(s) of the author.
  • website – Name of the website.
  • publisher – Publisher of the site.
  • date – Publication date.
  • location – Location of publisher.
  • url – Web page URL.
  • access-date – Date accessed.

Example Usage[edit]

{{Cite web
 | title = The Future of Renewable Energy
 | author = Jane Doe
 | website = Green Insights
 | publisher = Eco Media
 | date = 2023-08-01
 | location = London, UK
 | url = https://example.com/renewable-energy
 | access-date = 2023-09-01
}}

Result[edit]

  • Jane Doe. The Future of Renewable Energy (link). Green Insights. Eco Media. 2023-08-01. London, UK. Accessed 2023-09-01.