Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How do I modify .hbr template and CSS files for SmartDocs?

Not applicable

Greetings all,

I read the Apigee documentation on how to modify the SmartDocs look and feel here: http://apigee.com/docs/developer-services/content/using-smartdocs-document-apis. However, that page is confusing to me. What we want to do is modify the SmartDocs template and CSS files once, and have them apply to all SmartDocs models, not just one model. I see that there is a template (.hbr) file, CSS files and Javascript files that affect the SmartDocs template here: profiles/apigee/modules/custom/devconnect/smartdocs/css/smartdocs.css profiles/apigee/modules/custom/devconnect/smartdocs/local/css/v1/main.css profiles/apigee/modules/custom/devconnect/smartdocs/local/css/v2/main.css profiles/apigee/modules/custom/devconnect/smartdocs/local/css/v3/main.css profiles/apigee/modules/custom/devconnect/smartdocs/local/css/v4/main.css profiles/apigee/modules/custom/devconnect/smartdocs/local/css/v5/main.css profiles/apigee/modules/custom/devconnect/smartdocs/local/css/v6/main.css profiles/apigee/modules/custom/devconnect/smartdocs/local/js/v1/model.js profiles/apigee/modules/custom/devconnect/smartdocs/local/js/v2/model.js profiles/apigee/modules/custom/devconnect/smartdocs/local/js/v3/model.js profiles/apigee/modules/custom/devconnect/smartdocs/local/js/v4/model.js profiles/apigee/modules/custom/devconnect/smartdocs/local/js/v5/model.js profiles/apigee/modules/custom/devconnect/smartdocs/local/js/v6/model.js profiles/apigee/modules/custom/devconnect/smartdocs/templates/smartdocs.hbr However, if we change these files then they will be overwritten the next time Apigee does an upgrade because they are in the profiles/apigee folder rather than somewhere in our theme.

I see that we can check the Configuration->SmartDocts->Advanced Settings->Management API Override Settings->Use Local SmartDocs JS/CSS checkbox. But, where do the .HBR, JS and CSS files come from if we do that? There is no upload button so I’m not sure where in the folder tree we are supposed to put the .HBR, JS and CSS files or how we can ensure they over-ride or take the place of the default CSS or .HBR. Should we be providing complete JS/CSS files that are copied from the v6 versions, or only provide the parts of the CSS that we want changed in a different file, or how does this work and where should we put them? The other thing that is confusing to me is that there are six versions of the JS and CSS files. Which ones get loaded? i.e. Which ones should we start with to make changes from? Please advise. Thanks.

1 2 1,291
2 REPLIES 2