zfcampus / zf-apigility-documentation-swagger

BSD 3-Clause "New" or "Revised" License
11 stars 27 forks source link

How to modify UI? #8

Closed snowwolf007cn closed 10 years ago

snowwolf007cn commented 10 years ago

I need to customize my swagger ui, i.e, modify title, layout color, etc. How to do it?

weierophinney commented 10 years ago

If you want to alter the look-and-feel of the individual pages, you will want to create new templates for them, and then instruct the view manager to use your own.

So, let's assume you've created your API as the "Api" module:

The "list" view uses the zf-apigility layout. To modify that, change the module/Application/view/layout/layout.phtml file.

In terms of modifying colors in the swagger UI, you'll likely want to introduce your own CSS. Write your own CSS, and in the "show" template, add your CSS file.