Creating concrete5 Themes
()
About this ebook
Read more from Remo Laubacher
concrete5 Beginner's Guide - Second Edition Rating: 0 out of 5 stars0 ratingsconcrete5 Beginner's Guide Rating: 0 out of 5 stars0 ratings
Related to Creating concrete5 Themes
Related ebooks
Liferay 6.x Portal Enterprise Intranets Cookbook Rating: 0 out of 5 stars0 ratingsMySQL 5.1 Plugin Development Rating: 0 out of 5 stars0 ratingsWordPress 2.7 Cookbook Rating: 2 out of 5 stars2/5COBOL A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsVPS Server Setup Rating: 5 out of 5 stars5/5Principles of Package Design: Creating Reusable Software Components Rating: 0 out of 5 stars0 ratingsBuilding Xamarin.Forms Mobile Apps Using XAML: Mobile Cross-Platform XAML and Xamarin.Forms Fundamentals Rating: 0 out of 5 stars0 ratingsBuilding a Human Framework with AI Rating: 0 out of 5 stars0 ratingsVMware vRealize Orchestrator Cookbook - Second Edition Rating: 5 out of 5 stars5/5Infusionsoft Cookbook Rating: 0 out of 5 stars0 ratingsPrestaShop 1.3 Beginner's Guide Rating: 5 out of 5 stars5/5Kubernetes from basic to advanced levels Rating: 0 out of 5 stars0 ratingsMagento Beginner's Guide Rating: 0 out of 5 stars0 ratingsMicrosoft Access 2021 Programming Pocket Primer: A Comprehensive Guide to Mastering Access VBA Rating: 0 out of 5 stars0 ratingsEvent Processing for Business: Organizing the Real-Time Enterprise Rating: 0 out of 5 stars0 ratingsA Class ePub Rating: 0 out of 5 stars0 ratingsWordPress 3.0 jQuery Rating: 0 out of 5 stars0 ratingsMake money online Rating: 0 out of 5 stars0 ratingsBusiness Systems A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsInstruction set architecture A Complete Guide Rating: 0 out of 5 stars0 ratingsLearning Bootstrap 4 by Building Projects: Develop 5 real-world Bootstrap 4.x projects from scratch Rating: 0 out of 5 stars0 ratingsLearning Go Web Development Rating: 0 out of 5 stars0 ratingsGetting Started with OpenCart Module Development: Master your OpenCart modules and code! Rating: 0 out of 5 stars0 ratingsMastering Bootstrap 4 Rating: 5 out of 5 stars5/5Building Impressive Presentations with Impress.js Rating: 4 out of 5 stars4/5Getting Started with Web Components: Build modular and reusable components using HTML, CSS and JavaScript Rating: 0 out of 5 stars0 ratingsMastering Bootstrap 4: Master the latest version of Bootstrap 4 to build highly customized responsive web apps, 2nd Edition Rating: 0 out of 5 stars0 ratingsAdvanced Express Web Application Development: For experienced JavaScript developers this book is all you need to build highly scalable, robust applications using Express. It takes you step by step through the development of a single page application so you learn empirically. Rating: 0 out of 5 stars0 ratings
Computers For You
The Invisible Rainbow: A History of Electricity and Life Rating: 5 out of 5 stars5/5Mastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 4 out of 5 stars4/5Elon Musk Rating: 4 out of 5 stars4/5The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution Rating: 4 out of 5 stars4/5Standard Deviations: Flawed Assumptions, Tortured Data, and Other Ways to Lie with Statistics Rating: 4 out of 5 stars4/5How to Create Cpn Numbers the Right way: A Step by Step Guide to Creating cpn Numbers Legally Rating: 4 out of 5 stars4/5Uncanny Valley: A Memoir Rating: 4 out of 5 stars4/5Alan Turing: The Enigma: The Book That Inspired the Film The Imitation Game - Updated Edition Rating: 4 out of 5 stars4/5Excel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsEverybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5The ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 4 out of 5 stars4/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5The Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5Deep Search: How to Explore the Internet More Effectively Rating: 5 out of 5 stars5/5CompTIA Security+ Get Certified Get Ahead: SY0-701 Study Guide Rating: 5 out of 5 stars5/5Slenderman: Online Obsession, Mental Illness, and the Violent Crime of Two Midwestern Girls Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5101 Awesome Builds: Minecraft® Secrets from the World's Greatest Crafters Rating: 4 out of 5 stars4/5Procreate for Beginners: Introduction to Procreate for Drawing and Illustrating on the iPad Rating: 5 out of 5 stars5/5The Professional Voiceover Handbook: Voiceover training, #1 Rating: 5 out of 5 stars5/5ChatGPT 4 $10,000 per Month #1 Beginners Guide to Make Money Online Generated by Artificial Intelligence Rating: 0 out of 5 stars0 ratingsLearning the Chess Openings Rating: 5 out of 5 stars5/5An Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5CompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsTor and the Dark Art of Anonymity Rating: 5 out of 5 stars5/5
Reviews for Creating concrete5 Themes
0 ratings0 reviews
Book preview
Creating concrete5 Themes - Remo Laubacher
Table of Contents
Creating concrete5 Themes
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started
Getting your own concrete5 site
Start working with concrete5
Dashboard to manage concrete5
How to edit content
What are blocks
What is an area?
Adding and updating blocks
Publishing changes and managing versions
Managing files
Uploading files
Working with stacks
Change the layout and style of your pages, areas, and blocks
Page types
Design to customize the appearance of blocks and areas
Splitting content in different columns
Creating and managing pages
Adding a new page
Adding default blocks to page types
Summary
2. Architecture of concrete5
The file structure of concrete5
concrete5 updates
Caching for better performance
The distinction of Model-View-Controller (MVC)
The anatomy of a page
The anatomy of a block
concrete5 API and helpers
Helpers
Events to hook into the core
What happens when a page is rendered
Why you might want to build a package
Basic package installer
Marketplace submission
Summary
3. Creating Your First Theme
Getting started with themes
Creating the first theme
Adding our page type template
Creating the shared header
Creating the shared footer
Adding a theme thumbnail
Installing your theme
Adding CSS files to a theme
Adding main.css
Adding typography.css
Content block styles
Performance perfection when including CSS files
Customizable styles
Adding more details
Global areas
Replacing the header area with a global area
Putting blocks in templates
Finding block properties
Templates for page types
Number of blocks per area
Background picture by page attribute
Creating the attribute to hold our picture
Assigning attribute to page type
Selecting background pictures
Working with attributes in the theme
Page-specific variables
Getting page name and description
Checking the edit mode
Getting the current page type
Summary
4. Styling Single Pages
What is a single page?
Creating our own single page
Installing single pages
Changing the single page layout
Adding view.php to your theme
Applying the theme to single pages
Overriding the single page's HTML output
Summary
5. Styling the Block Output
Overriding block templates
Additional block templates
Block templates with CSS and JavaScript
Content block in a box
Overriding blocks in packages
Changing the navigation
Working with the drop-down block template
Creating a portfolio list with filter
Adding portfolio attributes
Creating a page list filter template
Summary
6. Responsive Themes
Responsive or separate mobile websites
Responsive techniques
Media queries
How to scale pictures
Pictures on high-density screens
Viewport on small-screen devices
Navigation for small screens
Responsive layout implementation in concrete5
Responsive bootstrap CSS
Responsive drop-down navigation
Responsive sidebar navigation
Summary
Index
Creating concrete5 Themes
Creating concrete5 Themes
Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: January 2013
Production Reference: 1210113
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78216-164-6
www.packtpub.com
Cover Image by Suresh Mogre (<suresh.mogre.99@gmail.com>)
Credits
Author
Remo Laubacher
Reviewer
Naume Keculovski
James Shannon
Acquisition Editor
Mary Jasmine Nadar
Commissioning Editor
Yogesh Dalvi
Technical Editors
Vrinda Amberkar
Charmaine Pereira
Pooja Prakashan
Lubna Shaikh
Hardik Soni
Copy Editor
Alfida Paiva
Aditya Nair
Ruta Waghmare
Project Coordinator
Amigya Khurana
Proofreader
Samantha Lyon
Indexer
Hemangini Bari
Graphics
Valentina D'silva
Aditi Gajjar
Production Coordinator
Prachali Bhiwandkar
Cover Work
Prachali Bhiwandkar
About the Author
Remo Laubacher grew up in Central Switzerland in a small village surrounded by mountains and natural beauty. He started working with computers a long time ago and then, after various computer related projects, he focused on ERP and Oracle development. After completing his BSc in Business Administration, Remo became a partner at Ortic, his ERP and Oracle business, as well as a partner at mesch web consulting and design GmbH. At mesch – where he's responsible for all development related topics – he discovered concrete5 as the perfect tool for their web-related projects and has since become a key member of the concrete5 community. You can find his latest publications at http://www.codeblog.ch/.
About the Reviewer
Naume Keculovski was born in 1983 in Macedonia, but grew up in a small village close to Zurich, Switzerland. After getting his EFZ degree with a focus on Application Development, he started working for a small company and gained his first practical web development experience. After finishing his internship, he started working for mesch and now builds the best possible web solutions on top of concrete5, with Remo Laubacher.
James Shannon has been actively developing with concrete5 since its early days. He's contributed to the core and built a number of c5-powered sites, but mostly uses it as a framework to build complex web applications. Additionally, he's released a handful of popular packages that augment concrete5's core functionality. More generally, he's been developing websites for 15 years using a number of technologies.
James' professional expertise is in strategic project management and change management.
James grew up in Southern California and graduated from UC Berkeley. He collects certifications, most recently one that allows him to fly planes.
I'd like to thank the person most important to me, Julie Talone, and the one most important to her, Henry.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print and bookmark content
On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Preface
The Creating concrete5 Themes book contains everything you'll need to use your experience with HTML, CSS, and PHP, to build custom themes for concrete5. You'll also get a first glimpse at more advanced features as well as a few examples showing you how to customize parts of the concrete5 core to uncover the power of this CMS.
What this book covers
Chapter 1, Getting Started, describes a few words about the requirements of concrete5 as well as instructions needed to get an understanding to edit content using concrete5.
Chapter 2, Architecture of concrete5, helps you understand a bit more about the internals of concrete5 for those who want to understand how things are working in concrete5.
Chapter 3, Creating Your First Theme, describes the practical part where you'll create your own theme.
Chapter 4, Styling Single Page, helps you learn how to change the look of existing pages such as the login or 404 page.
Chapter 5, Styling the Block Output, covers everything you need to know to change the output of the block elements, the actual content of a concrete5 site.
Chapter 6, Responsive Themes, covers a brief look into responsive techniques and how they can be integrated in concrete5.
What you need for this book
You'll need an environment where you can install and play around with concrete5. This can either be a Windows, Mac, or Linux computer with Apache, PHP, and MySQL, or even a remote server in combination with a text editor such as Notepad++ and a tool to upload files such as FileZilla.
Who this book is for
You don't need to be an experienced programmer to understand this book, but you should have an understanding of web technologies such as HTML and CSS. Some experience with a programming language, preferably PHP, is highly recommended, but not needed if you are a quick learner with a good understanding of computers.
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: The value of $pkg has to match the package directory and theme_book in PageTheme::add('theme_book', $pkg); has to match the name of the theme directory in themes.
A block of code is set as follows:
$mh = Loader::helper('mail');
$mh->setSubject('Hello lovely World');
$mh->setBody('Have a great day!');
$mh->to('the@world.org', 'The World');
$mh->from('me@switzerland.ch');
$mh->sendMail();
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
$areaMain = new Area('Main'); $areaMain->display($c);
?>
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: There are some links such as Add Image which are concrete5 specific.
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <feedback@packtpub.com>, and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to