Template:Businesses: Difference between revisions
From WikiDemocracy
Jump to navigationJump to search
Created page with "<noinclude> This is the "Businesses" template. It should be called in the following format: <pre> {{Businesses |business_name= |address= |description= |photos= |contact= |link..." |
No edit summary |
||
| Line 15: | Line 15: | ||
Edit the page to see the template text. | Edit the page to see the template text. | ||
{{#cargo_declare:_table=Businesses|business_name=String|address=String|description=Text|photos=List (,) of File|contact=Text|link=URL|reviews=URL}} | {{#cargo_declare:_table=Businesses|business_name=String|address=String|description=Text|photos=List (,) of File|contact=Text|link=URL|reviews=URL}} | ||
</noinclude><includeonly>{{#cargo_store:_table=Businesses|business_name={{{business_name|}}}|address={{{address|}}}|description={{{description|}}}|photos={{{photos|}}}|contact={{{contact|}}}|link={{{link|}}}|reviews={{{reviews|}}} | </noinclude><includeonly>{{#cargo_store:_table=Businesses|business_name={{{business_name|}}}|address={{{address|}}}|description={{{description|}}}|photos={{{photos|}}}|contact={{{contact|}}}|link={{{link|}}}|reviews={{{reviews|}}} }} | ||
|- | <div style="border: 1px solid #e0e0e0; border-radius: 8px; padding: 24px; max-width: 650px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); font-family: sans-serif; margin-bottom: 20px; background-color: #ffffff;"> | ||
! Contact | |||
| {{{contact|}}} | <!-- Header Section --> | ||
|- | <h2 style="margin: 0 0 10px 0; color: #222; font-size: 1.8em; border-bottom: none;">{{{business_name|}}}</h2> | ||
! | |||
<!-- Description & Address --> | |||
<p style="line-height: 1.6; color: #444; margin-bottom: 15px;">{{{description|}}}</p> | |||
| {{{reviews | <p style="font-size: 0.95em; color: #555; margin-bottom: 8px;"><strong>📍 Address:</strong> {{{address|}}}</p> | ||
<!-- Contact Info (Renders only if provided) --> | |||
{{#if:{{{contact|}}} | | |||
<p style="font-size: 0.95em; color: #555; margin-bottom: 15px;"><strong>📞 Contact:</strong> {{{contact}}}</p> | |||
}} | |||
<!-- Photos Array (Renders only if provided) --> | |||
{{#if:{{{photos|}}} | | |||
<div style="margin-top: 15px; margin-bottom: 15px;"> | |||
{{#arraymap:{{{photos|}}}|,|x|[[x|200px|class=photo-thumb]]}} | |||
</div> | |||
}} | |||
<!-- Clickable Action Buttons (Render only if links are provided) --> | |||
<div style="margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap;"> | |||
{{#if:{{{link|}}} | | |||
<a href="{{{link}}}" target="_blank" rel="noopener noreferrer" style="background: #17a2b8; color: white; padding: 10px 16px; text-decoration: none; border-radius: 6px; font-weight: bold;">🌐 Visit Website</a> | |||
}} | |||
{{#if:{{{reviews|}}} | | |||
<a href="{{{reviews}}}" target="_blank" rel="noopener noreferrer" style="background: #f39c12; color: white; padding: 10px 16px; text-decoration: none; border-radius: 6px; font-weight: bold;">⭐ Read Reviews</a> | |||
}} | |||
</div> | |||
</div> | |||
[[Category:Businesses]] | [[Category:Businesses]] | ||
</includeonly> | </includeonly> | ||
Revision as of 02:25, 27 August 2026
This is the "Businesses" template. It should be called in the following format:
{{Businesses
|business_name=
|address=
|description=
|photos=
|contact=
|link=
|reviews=
}}
Edit the page to see the template text. This template defines the table "Businesses". View table.