Custom Template Builder

Post Reply
digitalphotoworld
User
Posts: 416
Location: Nürnberg/Germany

Custom Template Builder

Post by digitalphotoworld »

The feature Custom Template is great, but is hard to design a template with all the possible options.

Please create something like an "Custom-Template-Builder" which creates all the needed tags similar to the builder for a view/custom-view.

In addition, it would be very helpful if you could create something what is able to generate a custom-template with the standard settings.

With this feature it would be very easy to make slight changes on the generated template. It also helps to avoid typos when developing a custom template with the parameters and settings which are possible.

It could work like the "without header" function in generating the files. Just a additional column with a checkbox which is generating the custom-templates based on the field setup.


strustam
User
Posts: 34
Location: Tajikistan

Post by strustam »

I don't know how to use correctly "table-tbody-tr-td", thet is why I draw table in html-online-editor, define where put "table-tbody-tr-td", after that I use produced code for Custom Template


oscarnortiz
User
Posts: 7

Post by oscarnortiz »

It is very time consuming when you have to redesign a WHOLE table with a lot of fields and you only want a simple change in the layout


tubianmaru
User
Posts: 4

Post by tubianmaru »

Maybe a "Custom-Template-Builder" is a heavy project for this moment but, at least for the default forms that is already generated by app for common action (list,add,edit) maybe a custom-template can be generated.


arbei
User
Posts: 9379

Post by arbei »

You may right click and repeat selected code for all fields in Custom Template Editor.


tubianmaru
User
Posts: 4

Post by tubianmaru »

If there is no custom template PHPMaker generates a page (be it list, edit or view) that has a certain format depending on the existing settings.
This page should be transformed into an "on-the-fly" template upon request.

All the best.


Webmaster
User
Posts: 9427

Post by Webmaster »

In v2021, the new templates in Code Repository are not static like old ones, they support scripting and behave like a page in the extension. In short, you can generate virtually anything. For example, if you choose the template "Basic Add page (grid)" for an Add page, you generate a Custom Template in Bootstrap Grid System (see https://getbootstrap.com/docs/4.5/layout/grid/) for that page in a few seconds. All that's left to do is just rearranging the DIV tags according to the design of your page, e.g. move a <div class="col"> to another row to make a row with multiple fields. (There will not be "form layout" designer like that for Windows Form in Visual Studio.)

mobhar
User
Posts: 11716

Post by mobhar »

You don't have to create "Form Layout Designer" just like in the Visual Studio, as we don't want that feature, actually. We obviously know that PHPMaker will never implement that feature.

The Form Layout that we want is actually just like a new feature in Table setup, for example, there is an option "Multiple Column" with another related settings how many column we want to define (similar to your existing feature in "Table" setup -> "Table-specific Options" -> "List Page").

But this time, the similar feature we want is for the Add/Edit/View/Search pages. The existing feature in List page that you already provided is very nice and we love it very much (this can make the records to be multiple column in the List page). So, it should be able to implement this similar feature also for Add/Edit/View/Search page.

We just want to enable this feature from Table level setup, instead of writing the code in Custom Template.

Webmaster
User
Posts: 9427

Post by Webmaster »

The "Multiple Column" feature for List page just put same number of records in each row. You can easily do it by adding a simple Custom Template in Code Repository to put same number of fields in each row, see https://getbootstrap.com/docs/4.5/layou ... ut-columns. However, that is not useful enough since the layout requirement for a Add/Edit/View/Search page varies from project to project, table to table and page to page. Users actually want to make a customized HTML form for a particular table like a PDF form, that should be done by Custom Template, see https://getbootstrap.com/docs/4.5/compo ... /#form-row. The main point of the new feature is about how to build a Custom Template quickly without the need to writing HTML for each field manually and that you can customize to suit your needs by scripting.

mobhar
User
Posts: 11716

Post by mobhar »

Webmaster wrote:
> since the layout requirement for a Add/Edit/View/Search page varies from project to project, table to table and page to page.

That's why the option to enable this Multiple Column is located under the Table setup, as well as the existing one you already provided for the List Page. So that we can enable just only for the tables we want.

And yes, we obviously know, not all tables/pages need this Multiple Column feature for the List page. The same way you provided for the List page, the same way also you should provide the options for Add/Edit/View/Search pages.

Webmaster
User
Posts: 9427

Post by Webmaster »

Webmaster wrote:
> You can easily do it by adding a simple Custom Template in Code Repository to put same number of fields in each row, see https://getbootstrap.com/docs/4.5/layou ... ut-columns.

Post Reply