![]() global/: This defines the header that goes on all Bugzilla pages. There are a few templates you may be particularly interested inĬustomizing for your installation. Try out the template by calling the CGI as This tag will be part of the template filename. ![]() ![]() The three- or four-letter tag assigned to your content type. If your content type is not there, add it. The content types are defined in theīugzilla/Constants.pm file in the contenttypesĬonstant. You now need to decide what content type you want your template Write your template in whatever markup or text style is appropriate. The code to find out what information you get. There isn’t one, I’m afraid you’ll have to read the template and That CGI and take note of the INTERFACE comment (if present.) ThisĬomment defines what variables are passed into this template. To make a new format template for a CGI which supports this, Multiple format/type support isn’t too hard - see how it’s done in To see if a CGI supports multiple output formats and types, grep theĬGI for get_format. More, you would be better off using the WebService API Reference to integrate with However, instead of using such interfaces or enhancing Bugzilla to add bugs are availableĪs HTML and as XML, and this mechanism is extensible also to add new content Particular subset of users or a particular type of bug.īugzilla can also support different types of output - e.g. This feature is extensible - you can create new templates to add new formats. For example,īuglist.cgi can output itself as two formats of HTML (complex and Some CGI’s have the ability to use more than one template. Permissions on the edited files are wrong so the webserver can’t read them. To do so may mean either that your changes are not picked up, or that the If you forget, you may open up your installation Template Toolkit to do this (or the uri filter to encode specialĬharacters in URLs). Such as <, and the data was not intended to be HTML, they need to beĬonverted to entity form, i.e. This means that if the data can possibly contain special HTML characters To properly HTML filter data that has been passed into the template. One thing you should take particular care about is the need Looking at the current templates or, you can read the manual, available on Language is beyond the scope of this guide. If you are making template changes that you intend on submittingīack for inclusion in standard Bugzilla, you should read the relevantīugzilla uses a templating system called Template Toolkit. Work properly until you have fixed the problem and re-integrated your code.Īlso, you can see what you’ve changed using git diff, which youĬan’t if you fork the file into the custom directory. On the downside, if the merge fails then Bugzilla will not You upgrade Bugzilla, git will merge your changes into the new Need to work out what had changed and adapt your template accordingly.įor minor changes, the convenience of the first method is hard to beat. Templates do change regularlyĪnd so interface changes are not individually documented, and you would Using the second method, your user interface may break if incompatibleĬhanges are made to the template interface. It’s also good forĮntirely new files, and for a few files likeīug/create/ which are designed to be entirely To merge your changes into the new versions by hand. To revert to the standard templates, continue using yours, or make the effort Touched during an upgrade, and you can then decide whether Guaranteed that the contents of the custom directory will not be Should be used if you are going to make major changes, because it is If there are no hooks available, then the second method of customization You just have to open up the template and see (search for Hook.process). Unlike code hooks, there is no requirement to document template hooks, so You can make modifications if you add JS code which then makes the To modify existing UI using hooks they are most commonly used for additions. The third method is the best if there are hooks in the appropriate placesĪnd the change you want to do is possible using hooks. You can use the hooks built into many of the templates to add or modify.Not exist by default and must be created if you want to use it.) Templates in thisĭirectory structure automatically override any identically-named You can copy the templates to be modified into a mirrored directory.You can directly edit the templates found in template/en/default.Modifications, and the method you plan to use to upgrade Bugzilla. There are threeĬhoices, and which you use depends mainly on the scope of your You must make is how you want to go about doing so. If you want to edit Bugzilla’s templates, the first decision
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |