Jump to content

Template:Boilerplate-ProductPage: Difference between revisions

From SOJI ELECTRONICS
[checked revision][checked revision]
No edit summary
No edit summary
Line 8: Line 8:
The template auto-uses the current page name for:
The template auto-uses the current page name for:
* All sub-page links (Datasheet, User Guide, etc.)
* All sub-page links (Datasheet, User Guide, etc.)
* Image filename convention: '''{{PAGENAME}}-product.png'''
* Image filename convention: '''{{PAGENAME}}-Product.png'''


To set product image: upload your image via [[Special:Upload]] with filename matching  
To set product image: upload your image via [[Special:Upload]] with filename matching
this pattern (e.g., for page "LIGO PRO", upload as "LIGO PRO-product.png").  
this pattern (e.g., for page "LIGO PRO", upload as "LIGO PRO-Product.png").  
The template will automatically display it. If not uploaded, a default icon shows  
The template will automatically display it. If not uploaded, a default icon shows  
with a hint to upload.
with a hint to upload.


To set description: after placing {{ProductPage}} on the page, the yellow placeholder  
To set description: after placing {{ProductPage}} on the page, the yellow placeholder
hint will show. Replace it by editing the page and adding your description text  
hint will show. Replace it by editing the page and adding your description text  
'''above''' the {{ProductPage}} template call.
'''above''' the {{ProductPage}} template call.
Line 39: Line 39:
</div>
</div>
<div style="flex: 0 0 320px;">
<div style="flex: 0 0 320px;">
{{#ifexist:File:{{PAGENAME}}-product.png
{{#ifexist:File:{{PAGENAME}}-Product.png
| [[File:{{PAGENAME}}-product.png|320px|center|{{PAGENAME}}]]
| [[File:{{PAGENAME}}-Product.png|320px|center|{{PAGENAME}}]]
| [[File:Icon-default.svg|320px|center|{{PAGENAME}}]]
| [[File:Icon-default.svg|320px|center|{{PAGENAME}}]]
}}
}}
<div style="text-align: center; font-size: 0.9em; color: #54595d; margin-top: 4px;">{{PAGENAME}}</div>
<div style="text-align: center; font-size: 0.9em; color: #54595d; margin-top: 4px;">{{PAGENAME}}</div>
{{#ifexist:File:{{PAGENAME}}-product.png
{{#ifexist:File:{{PAGENAME}}-Product.png
|
|
| {{Placeholder|Upload product image as "{{PAGENAME}}-product.png" via [[Special:Upload]] to replace the default icon.}}
| {{Placeholder|Upload product image as "{{PAGENAME}}-Product.png" via [[Special:Upload]] to replace the default icon.}}
}}
}}
</div>
</div>

Revision as of 09:29, 15 May 2026

Product Page Template

Usage on a product page (e.g., page named "LIGO PRO"):

Template:ProductPage

The template auto-uses the current page name for:

  • All sub-page links (Datasheet, User Guide, etc.)
  • Image filename convention: Boilerplate-ProductPage-Product.png

To set product image: upload your image via Special:Upload with filename matching this pattern (e.g., for page "LIGO PRO", upload as "LIGO PRO-Product.png"). The template will automatically display it. If not uploaded, a default icon shows with a hint to upload.

To set description: after placing Template:ProductPage on the page, the yellow placeholder hint will show. Replace it by editing the page and adding your description text above the Template:ProductPage template call.

Template:TemplateData

SOJI Electronics