PAD Showcase
All tags/Tabs

A tab per row

The tabs made in a loop - one per plan of the data, its features inside.

1 The data tabs/plans_from_data.php php
<?php

  $plans = [
    [ 'name' => 'Starter', 'price' => '€ 9',  'about' => 'for one person and a side project',
      'features' => [ 'One site', '10 GB storage', 'E-mail support' ] ],
    [ 'name' => 'Team',    'price' => '€ 29', 'about' => 'for a team that ships every week',
      'features' => [ 'Ten sites', '100 GB storage', 'Chat support', 'Daily backups' ] ],
    [ 'name' => 'Studio',  'price' => '€ 79', 'about' => 'for an agency with many clients',
      'features' => [ 'Unlimited sites', '1 TB storage', 'Phone support', 'Hourly backups', 'Staging' ] ]
  ];

?>
2 The template tabs/plans_from_data.pad pad
<div style="width:100%; max-width:640px">
  {tabs}
    {plans}
      {tab $name}
        <p><strong>{$price}</strong> a month - {$about}</p>
        <ul>{features}<li>{$features}</li>{/features}</ul>
      {/tab}
    {/plans}
  {/tabs}
</div>
3 The result rendered on the server

€ 9 a month - for one person and a side project

  • One site
  • 10 GB storage
  • E-mail support

€ 29 a month - for a team that ships every week

  • Ten sites
  • 100 GB storage
  • Chat support
  • Daily backups

€ 79 a month - for an agency with many clients

  • Unlimited sites
  • 1 TB storage
  • Phone support
  • Hourly backups
  • Staging