Skip to Content
Phoenix Web Development
book

Phoenix Web Development

by Brandon Richey
April 2018
Beginner to intermediate content levelBeginner to intermediate
406 pages
9h 33m
English
Packt Publishing
Content preview from Phoenix Web Development

Understanding templates

Templates are, at a very high level, a way to include common portions of content that should be included on multiple pages. By default, any call to render that renders an HTML template will have that render happen INSIDE of a template, and that template will be under /lib/vocial_web/templates/layout/app.html.eex. If we open up that file, we can see a base HTML structure and the default file that we’ll start off with:

<!DOCTYPE html><html lang="en"> <head>   <meta charset="utf-8">   <meta http-equiv="X-UA-Compatible" content="IE=edge">   <meta name="viewport" content="width=device-width, initial-scale=1">   <meta name="description" content="">   <meta name="author" content="">   <title>Hello Vocial!</title> <link rel="stylesheet" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Phoenix in Action

Phoenix in Action

Geoffrey Lessel
Real-Time Phoenix

Real-Time Phoenix

Stephen Bussey

Publisher Resources

ISBN: 9781787284197Supplemental Content