Custom Template Available Classes

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
michaelmcewen
User
Posts: 78

Custom Template Available Classes

Post by michaelmcewen »

I'm doing a customer template. Your help file has been invaluable. Most of them use classes such as "ewrow", "ewcell", ewTableHeader, etc.

I want to see what classes I have available for formatting the custom template. Where do I find that? Or is there a place I can read the name of the class and definition?


kirondedshem
User
Posts: 642

Post by kirondedshem »

I think all ew* css classes are phpmaker bootstrap calsses which auto adjust according to the current theme and help impliment the default look, feel and fucntionality required by all phpmaker pages. So If you want to see how they look like go the Html styles section and youll see thier default style sheet.

So if you still want to adjust those very classes then overirde them in user style section and put your own definitions and it will go into the whole project, a good understanding of css is required for this. Or just export a theme and fill it up with your own styles in xml and reupload that theme to appl yfor your projects as well.

BUT what is easier is, Since phpmaker uses bootstrap with Admin LTE, All bootstrap classes as well as all classes you see in Admin LTE are still available for use,
So I find it easier to just go to bootstrap sites as well as ADmin LTE default template(you can download the template so you can see what things are available) and see a given widget or given classes that bring out a given look and feel and just use those instead.

NOTE:Am using demo project cars2 for example:

For example I can change the custom list template of the cars2 table in demo project To look like "admin LTE simple bootstrap table", by passing the bootstrpa table clases instaed of the ew* classes as well as not passing the {{{row_attr}}} classes on each row so as to let it use the default bootsstrap ones like this.

In Template header put:
<table class="table table-bordered">
<thead>
<tr >
{{{list_options 2}}}
<td rowspan="2">{{{Picture}}}</td>
<td>{{{ID}}}</td>
<td>{{{Trademark}}}</td>
<td>{{{Model}}}</td>
<td>{{{HP}}}</td>
</tr>
<tr >
<td>{{{Liter}}}</td>
<td>{{{Cyl}}}</td>
<td>{{{Category}}}</td>
<td>{{{Price}}}</td>
</tr>
</thead>
<tbody>

In Template Body put:
<tr>
{{{list_options 2}}}
<td rowspan="2">{{{Picture}}}</td>
<td>{{{ID}}}</td>
<td>{{{Trademark}}}</td>
<td>{{{Model}}}</td>
<td>{{{HP}}}</td>
</tr>
<tr>
<td>{{{Liter}}}</td>
<td>{{{Cyl}}}</td>
<td>{{{Category}}}</td>
<td>{{{Price}}}</td>
</tr>

In template footer put:
</tbody>
<!-- <tfoot><tr class="ewTableFooter">{{{list_options}}}<td>{{{MyField1}}}</td><td>&nbsp;</td></tr></tfoot> -->
</table>

NOTE: so after generating the files you should see cars2list.php table looking like default bootstrap table s the same approach works elsewhere. You just nned a little creativity, you can even apply thse in jquery all at once etc etc


michaelmcewen
User
Posts: 78

Post by michaelmcewen »

Thank you SO much for the detail. I'll play with this for a bit!


Post Reply