Skip to content

Instantly share code, notes, and snippets.

@JQL
Created September 3, 2018 19:04
Show Gist options
  • Save JQL/145c3b9ca0fe4f4fc0c656c90dbcfbf0 to your computer and use it in GitHub Desktop.
Save JQL/145c3b9ca0fe4f4fc0c656c90dbcfbf0 to your computer and use it in GitHub Desktop.
Creating and Updating NetBeans Templates
Do you need to Create and Update the NetBeans Templates? Creating and Updating NetBeans Templates is very easy and in this video we show you how.
NetBeans Template Variables: http://wiki.netbeans.org/FaqTemplateVariables
Here are some suggested templates
1. Default Licence Template:
<#setting locale="en_GB">
<#if licenseFirst??>
${licenseFirst}
</#if>
${licensePrefix}Copyright ©${date?date?string("yyyy")} JQL all rights reserved.
${licensePrefix}No part of this site may be reproduced without prior permission.
${licensePrefix}http://jlavelle.uk
<#if licenseLast??>
${licenseLast}
</#if>
=======================
2. HTML File Template
${doctype}
<#assign licenseFirst = "<!--">
<#assign licensePrefix = "">
<#assign licenseLast = "-->">
<#include "${project.licensePath}">
<html>
<head>
<title>TODO supply a title</title>
<meta charset="${encoding}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div>TODO write content</div>
</body>
</html>
<!-- End of file ${nameAndExt}
Location: ./folder1/${nameAndExt} -->
=======================
3. HTML FULL Template (Includes Bootstrap)
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>TODO write title</title>
<!-- Bootstrap -->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="//oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="//oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
TODO write content
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins - needs to come before bootstrap.js) -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>
<#assign licenseFirst = "<!--">
<#assign licensePrefix = "">
<#assign licenseLast = "-->">
<#include "${project.licensePath}">
=======================
4. HTML FULL Template (Excludes Bootstrap)
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>TODO write title</title>
</head>
<body>
<div class="container">
TODO write content
</div>
</body>
</html>
<#assign licenseFirst = "<!--">
<#assign licensePrefix = "">
<#assign licenseLast = "-->">
<#include "${project.licensePath}">
=======================
5. PHP Template
<?php
<#assign licenseFirst = "/* ">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "${project.licensePath}">
/*
Created on : ${date}, ${time}
Author : ${user}
Title : ${name}
*/
// Code goes here
/* End of file ${nameAndExt} */
/* Location: ./folder1/${nameAndExt} */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment