EIONET Training Zope Page Templates Miruna Bădescu Finsiel Romania Copenhagen, 28 October 2003.

Slides:



Advertisements
Similar presentations
EIONET Training Searching and categorizing content Miruna Bădescu Finsiel Romania Copenhagen, 27 October 2003.
Advertisements

MA foundation Creating webpages using XHTML (part 1) Simon Mahony CCH
Master Pages, User Controls, Site Maps, Localization Svetlin Nakov Telerik Corporation
Java Server Pages Jeffrey Jongko. Introduction Java Server Pages (JSP) technology was created by Sun Microsystems and is built on top of Sun’s Java Servlet.
Cascading Style Sheets
1. Content – Collective term for all text, images, videos, etc. that you want to deliver to your audience. 2. Structure – How the content is placed on.
An Introduction to XML Based on the W3C XML Recommendations.
Introduction to MVC Adding a View Page NTPCUG Tom Perkins, Ph.D.
HTML 5 and CSS 3, Illustrated Complete Unit L: Programming Web Pages with JavaScript.
XHTML & CSS 2 By Trevor Adams. Last week XHTML eXtensible HyperText Mark-up Language The beginning – HTML Web Standards Concept and syntax Elements (tags)
Chapter 51 Scripting With JSP Elements JavaServer Pages By Xue Bai.
Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
DT211/3 Internet Application Development
CS320 Web and Internet Programming JSP Scripting Elements and Page Directives Chengyu Sun California State University, Los Angeles.
DT228/3 Web Development JSP: Directives and Scripting elements.
Python and Web Programming
Java Server Pages Russell Beale. What are Java Server Pages? Separates content from presentation Good to use when lots of HTML to be presented to user,
JSP Architecture  JSP is a simple text file consisting of HTML or XML content along with JSP elements  JSP packages define the interface for the compiled.
JavaServer Pages TM Introduce by
Microsoft Office Word 2013 Expert Microsoft Office Word 2013 Expert Courseware # 3251 Lesson 4: Working with Forms.
Course Textbook: Build Your Own ASP.Net Website: Chapter 2
Javascript and the Web Whys and Hows of Javascript.
Cascade Server for Developers Vince Ruppert College of Liberal Arts BoilerWeb 2011.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 9 JavaServer Pages (JSP) (Based on Møller.
HTML & CSS A brief introduction. OUTLINE 1.What is HTML? 2.What is CSS? 3.How are they used together? 4.Troubleshooting/Common problems 5.More resources.
JSP Standard Tag Library
4.1 JavaScript Introduction
Ch6:creating consistent looking web sites. Master pages Master page defines a combination of fixed content and content place holder to hold the web page(.aspx)
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
Lecture 6 of Advanced Databases XML Schema, Querying & Transformation Instructor: Mr.Ahmed Al Astal.
SYST Web Technologies SYST Web Technologies Lesson 6 – Intro to JavaScript.
CS134 Web Design & Development Creating a Basic Web Page Mehmud Abliz.
OBJECTIVES  What is HTML  What tools are needed  Creating a Web drive on campus (done only once)  HTML file layout  Some HTML tags  Creating and.
FIGIS’ML Hands-on training - © FAO/FIGIS An introduction to XML Objectives : –what is XML? –XML and HTML –XML documents structure well-formedness.
Introduction to Applets CS 3505 Client Side Scripting with applets.
® IBM Software Group © 2007 IBM Corporation JSP Expression Language
CMPS 211 JavaScript Topic 1 JavaScript Syntax. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
CA Professional Web Site Development Class 2: Anatomy of a Web Site and Web Page & Intro to HTML.
JSTL Lec Umair©2006, All rights reserved JSTL (ni) Acronym of  JavaServer Pages Standard Tag Library JSTL (like JSP) is a specification, not an.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Creating XHTML Documents Essentials for.
CF Pest Control By Shlomy Gantz President, BlueBrick Inc. Presented by Sandra Clark
Web Development 101 Presented by John Valance
1 A Balanced Introduction to Computer Science David Reed, Creighton University ©2005 Pearson Prentice Hall ISBN X Chapter 4 JavaScript and.
HTML.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
Chapter 3 JSP Overview. The Problem with Servlets processing the request and generating the response are both handled by a single servlet class Java programming.
CSS THE MISSING MANUAL Introduction. Benefits of CSS Style sheets offer more formatting choices than are offered in straight HTML  EXAMPLE: When you.
Basic HTML Document Structure. Slide 2 Goals (XHTML HTML5) XHTML Separate document structure and content from document formatting HTML 5 Create a formal.
Creating FunctionstMyn1 Creating Functions Function can be divided into two groups: –Internal (built in) functions –User-defined functions.
 Java Server Pages (JSP) By Offir Golan. What is JSP?  A technology that allows for the creation of dynamically generated web pages based on HTML, XML,
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
Introduction to Web Site Development Department of Computer Science California State University, Los Angeles Lecture 9: JavaScript.
HTML LAYOUTS. CONTENTS Layouts Example Layout Using Element Example Using Table Example Output Summary Exercise.
EIONET Portal Tool Kit Miruna Bulandra Finsiel Romania Copenhagen, 28 May 2002.
INTRODUCTION ABOUT DIV Most websites have put their content in multiple columns. Multiple columns are created by using or elements. The div element is.
Section 10.1 Define scripting
JSP: Actions elements and JSTL
Zope Concepts - Zope Page Templates
Creating UI elements with Handlebars
What is HTML?.
Web Development Using ASP .NET
Using Templates and Library Items
Web Programming and Design
Presentation transcript:

EIONET Training Zope Page Templates Miruna Bădescu Finsiel Romania Copenhagen, 28 October 2003

Concepts n ZPT - Zope Page Templates are a web page generation tool n The TAL - Template Attribute Language is an attribute language used to create dynamic templates n METAL - Macro Expansion TAL is a macro language built into the ZPT system Macros are a way to share chunks of presentation, and have the shared stuff appear inline in the template – Evan Simpson n The TALES - Template Attribute Language Expression Syntax standard describes expressions that supply TAL and METAL with data

Zope Page Templates aim n Play nicely with editing tools. n What you see is very similarly with what you get. n Keep code out of templates, except for structural logic. n It is a valid HTML page outside/inside Zope. Allow designers and programmers to work together easily. n Dynamically renders XML as well as HTML n It is deliberately not as powerful and general-purpose as it could be. It is meant to be used inside Zope in which other objects handle business logic and the tasks unrelated to the page layout.

Page Templates vs. DTML n DTML is not aimed at HTML designers. n A page with DTML code into it, becomes invalid HTML outside Zope. n DTML suffers from a failure to separate presentation, logic, and content (data). n DTML can do things that Page Templates can't (e.g. dynamically generate messages ) n DTML is enough easy script language to do simple scripts for simple sites n DTML adds too much magic to object lookup without allowing enough control

Replacing DTML with ZPT n DTML: ZPT: Page Title - here resolves to the object to which the template is applied - tal:content attribute is a TAL statement that set the text contained by the title tag, and the value "here/title" is an expression providing the text to insert into the tag. n DTML: ">contact ZPT: contact - tal:attributes replaces the value of an attribute or create a new one with dynamic value; string evaluates a TALES string expression

Replacing DTML with ZPT n DTML: ZPT: request info - tal:replace attribute is a TAL statement that replace the content of an element and removes the element leaving the content; structure – the value it is not html encoded n DTML: ZPT : - tal:condition conditionally inserts or removes an element - python executes a python expression

Replacing DTML with ZPT n DTML: ZPT: - tal:repeat replicates a sub-tree of your document once for each item in a sequence; the expression should evaluate to a sequence - tal:define defines variables (local variables are default)

Using Macros n You can define macros with tag attributes similarly to TAL statement Last updated If you change the macro then all page templates that use the macro will automatically reflect the change. You can use macros from other page templates by referring to them through the macros attribute of the page template in which they are defined. Macro goes here - metal:define-macro -- macro is identified by a path expression using this statement - metal:use-macro – replace the statement element with named macro

Using Slots n Common use of slot is to provide default presentation which you can customize n In the following example, the slot definition is just an empty span element n You can fill the slot with any html code you want, for example : Info