Sunday, July 17, 2016
In the previous blog post we created an empty Blogger template with just the bar minimums. In this post we are going to build on that and display our posts in just 32 lines of code. In your template type in the following code.
The code above uses a built-in widget call "Blog1" to retrieve our blog posts. We display the title as a link data:post.link and the post body as text data.post.body. We put the widget inside the main section. All the logic must go inside the <b:include> tag, the widget cannot contain any code itself all it can contain is an include.
Here is how the code above would look like in an actual blog at http://bloggerdevsandbox.blogspot.com/
Blogger Template Development Series:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html> <html> <head> <title><data:blog.pageTitle/></title> <b:skin><![CDATA[/*]]></b:skin> </head> <body> <b:section class='main' id='main' name='Main' showaddelement='no'> <b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog' visible='true'> <b:includable id='post' var='post'> <a expr:name='data:post.id'/> <b:if cond='data:post.title'> <b:if cond='data:post.link or (data:post.url and data:blog.url != data:post.url)'> <a expr:href='data:post.link ? data:post.link : data:post.url'><data:post.title/></a> <b:else/> <data:post.title/> </b:if> </b:if> <data:post.body/> <b:if cond='data:post.hasJumpLink'> <div class='jump-link'> <a expr:href='data:post.url + "#more"' expr:title='data:post.title'><data:post.jumpText/></a> </div> </b:if> </b:includable> </b:widget> </b:section> <b:section id='side-bar-left'/> </body> </html>
The code above uses a built-in widget call "Blog1" to retrieve our blog posts. We display the title as a link data:post.link and the post body as text data.post.body. We put the widget inside the main section. All the logic must go inside the <b:include> tag, the widget cannot contain any code itself all it can contain is an include.
Here is how the code above would look like in an actual blog at http://bloggerdevsandbox.blogspot.com/
Blogger Template Development Series:
- Blogger Template From Scratch : Create An Empty Template
- Blogger Template : Display Blog Posts With Just 32 Lines of Code
Subscribe to:
Post Comments (Atom)
Search This Blog
Tags
Web Development
Linux
Javascript
DATA
CentOS
ASPNET
SQL Server
Cloud Computing
ASP.NET Core
ASP.NET MVC
SQL
Virtualization
AWS
Database
ADO.NET
AngularJS
C#
CSS
EC2
Iaas
System Administrator
Azure
Computer Programming
JQuery
Coding
ASP.NET MVC 5
Entity Framework Core
Web Design
Infrastructure
Networking
Visual Studio
Errors
T-SQL
Ubuntu
Stored Procedures
ACME Bank
Bootstrap
Computer Networking
Entity Framework
Load Balancer
MongoDB
NoSQL
Node.js
Oracle
VirtualBox
Container
Docker
Fedora
Java
Source Control
git
ExpressJS
MySQL
NuGet
Blogger
Blogging
Bower.js
Data Science
JSON
JavaEE
Web Api
DBMS
DevOps
HTML5
MVC
SPA
Storage
github
AJAX
Big Data
Design Pattern
Eclipse IDE
Elastic IP
GIMP
Graphics Design
Heroku
Linux Mint
Postman
R
SSL
Security
Visual Studio Code
ASP.NET MVC 4
CLI
Linux Commands
Powershell
Python
Server
Software Development
Subnets
Telerik
VPC
Windows Server 2016
angular-seed
font-awesome
log4net
servlets
tomcat
AWS CloudWatch
Active Directory
Angular
Blockchain
Collections
Compatibility
Cryptocurrency
DIgital Life
DNS
Downloads
Google Blogger
Google Chrome
Google Fonts
Hadoop
IAM
KnockoutJS
LINQ
Linux Performance
Logging
Mobile-First
Open Source
Prototype
R Programming
Responsive
Route 53
S3
SELinux
Software
Unix
View
Web Forms
WildFly
XML
cshtml
githu
Mua vé tại đại lý vé máy bay Aivivu, tham khảo
ReplyDeletegiá vé máy bay đi Mỹ khứ hồi
chuyến bay từ mỹ về việt nam covid
bay từ đức về việt nam mấy tiếng
vé máy bay từ nga về việt nam
khi nào có chuyến bay từ anh về việt nam
ve may bay tu phap ve viet nam
chuyen bay chuyen gia ve viet nam