Template:Businesses: Difference between revisions

From WikiDemocracy
Jump to navigationJump to search
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 7: Line 7:
|address=
|address=
|description=
|description=
|photos=
 
|contact=
|contact=
|link=
|link=
|reviews=
 
}}
}}
</pre>
</pre>
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>{{#seo:
|title={{{business_name|}}}
|description={{{description|}}}
|type=article
}}{{#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;">
<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;">
Line 32: Line 36:
   }}
   }}


   <!-- Photos Array (Renders only if provided) -->
 
   {{#if:{{{photos|}}} |
   <!-- Clickable Action Buttons (Render only if links are provided) -->
     <div style="margin-top: 15px; margin-bottom: 15px;">
<div style="margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap;">  
      {{#arraymap:{{{photos|}}}|,|x|[[x|200px|class=photo-thumb]]}}
   {{#if:{{{link|}}} |  
    </div>
     <span style="background: #17a2b8; padding: 10px 16px; border-radius: 6px; font-weight: bold;">[{{{link}}} <span style="color: white; text-decoration: none;">🌐 Visit Website</span>]</span>
  }}
  }}
  {{#if:{{{reviews|}}} |  
    <span style="background: #f39c12; padding: 10px 16px; border-radius: 6px; font-weight: bold;">[{{{reviews}}} <span style="color: white; text-decoration: none;">⭐ Read Reviews</span>]</span>
  }}  
</div>
</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>

Latest revision as of 15:38, 27 August 2026

This is the "Businesses" template. It should be called in the following format:

{{Businesses
|business_name=
|address=
|description=

|contact=
|link=

}}

Edit the page to see the template text. This template defines the table "Businesses". View table.