Skip to content

Instantly share code, notes, and snippets.

@elpete
Created September 21, 2016 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elpete/08fa9bda3f545254457be7cb47edf34b to your computer and use it in GitHub Desktop.
Save elpete/08fa9bda3f545254457be7cb47edf34b to your computer and use it in GitHub Desktop.
Overriding the HTML title in ColdBox (without using cfhtmlhead)
<cfoutput>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>#event.getPrivateValue( "title", "Welcome to My Site!" )#</title>
</head>
<body>
<div class="container">
#renderView()#
</div>
</body>
</cfoutput>
component {
function index( event, rc, prc ) {
prc.title = "This is the updated title";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment