Cascade Server for Developers Vince Ruppert College of Liberal Arts BoilerWeb 2011.

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

EIONET Training Zope Page Templates Miruna Bădescu Finsiel Romania Copenhagen, 28 October 2003.
Unit 3 Day 4 FOCS – Web Design. No Journal Entry.
Cascading Style Sheets
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
Advanced Web Design Using Dreamweaver Robby Seitz 121 Powers Hall
CSW131 Steven Battilana 1 CSW 131 – Chapter 5 (More) Advanced CSS Prepared by Prof. B. for use with Teach Yourself Visually Web Design by Ron Huddleston,
HTML 5 and CSS 3, Illustrated Complete Unit L: Programming Web Pages with JavaScript.
The Web Warrior Guide to Web Design Technologies
Chapter 3 Working with Text and Cascading Style Sheets.
Understand Web Page Development Software Development Fundamentals LESSON 4.1.
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
Using the UCI templates in Cascade Server for your site. (a first glance)
DT228/3 Web Development JSP: Directives and Scripting elements.
Guide To UNIX Using Linux Third Edition
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
 What I hate about you things people often do that hurt their Web site’s chances with search engines.
Course Textbook: Build Your Own ASP.Net Website: Chapter 2
Review of last Session Adding custom html Adding custom html HTML is the language that web servers understand, all web pages are created using HTML. HTML.
 Using Microsoft Expression Web you can: › Create Web pages and Web sites › Set what you site will look like as you design it › Add text, images, multimedia.
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.
@Ms. Masihi.  Adobe Creative Suite is comprised of several separate applications – Bridge, Version Cue, Photoshop, Fireworks, Flash, InDesign, Illustrator,
Advanced CSS - Page Layout. Advanced CSS  Compound Selectors:  Is a Dreamweaver term, not a CSS term.  Describes more advanced types of selectors such.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
Shows the entire path to the file, including the scheme, server name, the complete path, and the file name itself. Same idea of stating your full name,
Lesson 4: Using HTML5 Markup.  The distinguishing characteristics of HTML5 syntax  The new HTML5 sectioning elements  Adding support for HTML5 elements.
Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
WORKING WITH XSLT AND XPATH
09/28/ Cascade Server User's Conference1 Smart Cascade Server Implementations & Strategies 2009 Cascade Server User’s Conference Justin Klingman,
CHAPTER 3 Working with Templates and Styles. CHAPTER OBJECTIVES  Create an Expression Web site from a template  Rename a page  Rename a folder  Add.
HTML and Style. Session overview Leveling-off on the basic concepts of HTML and Styles Discuss Web authoring options.
1 Macromedia Dreamweaver Outline Introduction Macromedia Dreamweaver Text Styles Images and Links Symbols and Lines Tables Forms Scripting in Dreamweaver.
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
Session 1 SESSION 1 Working with Dreamweaver 8.0.
Copyright © Eric Liria Web Site Builder This application allows you to build and manage web sites. It provides the following functionnalities: use.
CMPS 211 JavaScript Topic 1 JavaScript Syntax. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction.
Introduction to Cascading Style-sheets (CSS) Basharat Mahm ood, Department of Computer Science, CIIT,Islamabad, Pakistan 1.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 5 INTRODUCTION JAVASCRIPT G H E F.
Definition CSS “Short for Cascading Style Sheets, a new feature being added to HTML that gives both Web site developers and users more control over how.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
1 Overview of XSL. 2 Outline We will use Roger Costello’s tutorial The purpose of this presentation is  To give a quick overview of XSL  To describe.
XP Tutorial 8 Adding Interactivity with ActionScript.
Tutorial 3 Adding and Formatting Text with CSS Styles.
Cascading Style Sheets CSS. Source W3Schools
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
CSCI 6962: Server-side Design and Programming Facelets and User Interface Design.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Introducing Dreamweaver. Dreamweaver The web development application used to create web pages Part of the Adobe creative suite.
Project 5: Using Pop-Up Windows Essentials for Design JavaScript Level One Michael Brooks.
Positioning Objects with CSS and Tables
Basic HTML Document Structure. Slide 2 Goals (XHTML HTML5) XHTML Separate document structure and content from document formatting HTML 5 Create a formal.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
© 2010 Delmar, Cengage Learning Chapter 11 Creating and Using Templates.
CSS IS A LANGUAGE DESIGNED TO TARGET HTML ELEMENTS AND NODES BY TYPE, CLASS, ID AND VALUE, AND CHANGE THEIR VALUES CSS – change how your HTML looks and.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Chapter 10 Dynamic HTML (DHTML) JavaScript, Third Edition.
DYNAMIC FAQ AND DOCUMENTATION PAGES IN SHAREPOINT A modern, reusable, and easy-to-use model.
XP Creating Web Pages with Microsoft Office
Project 1 Introduction to HTML.
Introduction to Dynamic Web Programming
Building Web Applications
Starting to develop a website
Working with Text and Cascading Style Sheets
Dreamweaver.
Web Programming and Design
Presentation transcript:

Cascade Server for Developers Vince Ruppert College of Liberal Arts BoilerWeb 2011

Purpose Help those of you who have not yet started to fully develop web sites in Cascade Server Share experiences and helpful tips with those who are currently developing sites in Cascade

Outline Overview of the system Main building blocks: Templates, Blocks, Formats – Most development time will be spent working with blocks and formats Examples from current sites developed in Cascade

Overview of the system Main areas are similar to Serena Collage – Actions across the top – Site navigation on left – “Current view” area on the right Developers will be using Administration area

When creating a new site The first thing you should do is upload static template-related elements such as images, CSS files, JavaScript, or anything else referenced in your HTML template Do not put CSS/image files inside the _internal folder as this folder is not set to publish

CSS files CSS files should use Cascade’s method of internally linking to images using the [system-asset] tags. Example: #mainbox { background-image:url("[system-asset]/images/body-top.jpg[/system-asset]"); } Make sure you enable link re-writing!

Templates, Blocks, Formats A Template is a file which contains the basic HTML structure of your website along with regions defined in place of dynamic content A Block is either an editable piece of content (XHTML or Data Definition) or an Index Block which dynamically grabs data A Format parses the data in a Block and translates it to HTML

Templates Template files should only contain static HTML that you are certain will never change Anything dynamic should be replaced with a region using the tag: – Must have at least one region named “default”. Each region defines a location in the HTML where a Block will be placed

Template example FISP : Fédération Internationale des Sociétés de Philosophie Fédération Internationale des Sociétés de Philosophie Copyright © 2011 Fédération Internationale des Sociétés de Philosophie

Templates Unlike for CSS files, you do not need to use [system-asset] tags when linking to files in a Template. Template must remain valid (well-formed) XHTML after addition of regions. – Can’t have this:

Templates After the template has been added, the next step is usually adding a configuration set and a content type. Now you can assign the template to a page. If no Data Definition is selected, a WYSIWYG field is used for the Default region Even with a data definition, the default region shouldn’t have a block assigned to it. Eventually you should create a format for the default region

Blocks and Formats All content not in your static HTML Template file will come from Blocks Blocks are assigned to Template regions XHTML Blocks are like “content includes” Index Blocks generate XML, so you should assign a Format to an index block to convert the XML to HTML

Regions, Blocks, and Formats example

Index Blocks Index Blocks will contain a lot more data than you will use Goal is to create index blocks which contain just enough information you need to display without being too broad It’s the job of a Format to parse through all of the XML data and show only information you want to display

Current Page Index Block The most common Index Block is one that simply grabs all the current page’s data for use in a particular region Useful for outputting: – Page headlines – Metadata or using metadata values as logic – Page content outside the Default region

Current Page Index Block

Might produce something like this: index College Resources /resources/index CLA Main site://CLA Main/resources/index banner_size Large Resources in the College (Main Content)

Index Block for folder navigation Either points to an absolute folder (top level) or relative to current page Can restrict how many levels deep the index block will look Whenever possible, try to avoid rendering XML inline

Index Block for folder navigation

Might produce something like this: index /index site://FISP/index What is FISP? Lots of page content olympiad /olympiad site://FISP/olympiad Olympiad Lots of page content

Formats Now that we have the information we want to use in an Index Block, we need to assign a Format to parse the information and display HTML There are two types of Formats you can use in Cascade: XSLT or “Script” (Velocity) Covered in this presentation are Script Formats due to their similarity to a structured programming language

Formats Script Formats in Cascade Server use a combination of 3 other languages: Apache Velocity, JDOM, and XPath A bit confusing because you could use all 3 languages in a single line of code but you will commonly only use a couple commands from each language

Apache Velocity Syntax often starts with a pound (hash) sign: # Commonly used commands are #set, #if, #foreach and #end, along with the variable notation with dollar signs such as $variable Used in conjuncture with JDOM

XPath XPath is what it used to traverse and parse the XML contained in a Block Lots of documentation available online with examples Also use XPath with XSLT Formats

JDOM A much larger specification than Velocity Common methods used with variables: getChild(‘child’), getAttribute(‘attribute’), getParent(), and isEmpty() Common methods used with XPath in Cascade: selectNodes(), selectSingleNode()

Example: Get and display headline index College Resources /resources/index CLA Main site://CLA Main/resources/index banner_size Large Resources (Main Content) #set($sds = $_XPathTool.selectSingleNode($contentRoot, ”/system-index-block/calling-page/system- page/system-data-structure”)) #set($headline = $sds.getChild(‘headline’)) ${headline.value} OR, a bit less code: #set($headline = $_XPathTool.selectSingleNode($contentRoot, ”//system-data-structure/headline”)) $headline.value

Example: Display navigation index /index site://FISP/index What is FISP? Content olympiad /olympiad site://FISP/olympiad Olympiad Content #set($pages = $_XPathTool.selectNodes($contentRoot, ”/system-index-block/system-page”)) #foreach($page in $pages) $page.getChild(‘system- data-structure’).getChild(‘pagetitle’).value #end OR, want the index page to be displayed differently? #set($pages = $_XPathTool.selectNodes($contentRoot,”//system-page”)) #foreach($page in $pages) #if($page.getChild(‘name’).value == ‘index’) $page.getChild(‘system- data-structure’).getChild(‘pagetitle’).value #else $page.getChild(‘system- data-structure’).getChild(‘pagetitle’).value #end

Advanced examples The following creates a breadcrumb trail of index pages, starting at the current page = ‘true’) and then finding system-folder ancestors and their respective index pages. #set($breadcrumbs = $_XPathTool.selectNodes($contentRoot,"//system- = 'index']")) The following grabs pages that should appear on the left navigation for the current page. First we grab all pages which are not index pages in the current folder and all index pages in sub-folders and merge these results together (by use of the pipe symbol which means “or”). Then we also filter out any page where the ‘hide’ metadata option is set to ‘Left sidebar’. #set($siblings = $_XPathTool.selectNodes($starting_folder,"(system- page[name!='index'] | system-folder/system-page[name='index'])[dynamic- metadata[name='hide'][value!='Left sidebar']]"))

Asset Factories Asset Factories make it easy to create new pages with an automatically assigned content type After you have everything working with your configuration set and content type, create a blank page and copy it into the “/_internal/base assets” folder Now you can create an asset factory using this base asset

Migrating from Serena Collage AssetQuery, NavBar now handled by Index Blocks and XPath Select now handled by Velocity’s #if statements Ampersands do not work in non-WYSIWYG fields (use & if you must use one) Ampersands and parentheses do not work in filenames

Resources Script Formats: Formats/ Formats/ – Velocity: 1.5/user-guide.html 1.5/user-guide.html – JDOM: ml ml – XPath: us/library/ms aspxhttp://msdn.microsoft.com/en- us/library/ms aspx Cascade Support Forum: ITaP Cascade Wiki: e+Documentation e+Documentation