590 likes | 698 Views
Learn how Database Publishing in Cascade Server facilitates seamless news sharing among interconnected sites, avoiding duplication and multiple publishes. Utilize custom metadata and PHP queries for efficient content distribution.
E N D
Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy
How many of you… • New to Cascade Server? • Are adminstrators? • Use Cascade for multiple, separate but related sites? • Have worked on any Web site that pulled data dynamically from a DB? • Have used Cascade’sDatabase Publishing?
External Database Cascade Server
Site A Site B Site C External Database Site D Cascade Server Site 5
UDM’s sites College of Health Professions College of Business Admin. www (General site) School of Dentistry College of Engineering & Science College of Liberal Arts & Education Alumni
The idea: share news • Enable each site to share (access / use) the news articles of every other site • Selective inclusion • E.g. • The Business site can include news from the Engineering site, like Ford CEO visit • The Alumni site can pull articles from any site where alumni are mentioned
Sharing isn’t always easy • Sharing articles withinCascade was difficult and/or inefficient • Index blocks • Highly contorted XSL • Publishing to various sites also tricky • Publish all news pages on all sites • We did get it working …
Sharing isn’t always easy • Upgrade to version 5broke it
“DBP” for short (“DaBaPu” didn’t test well)
The goals • Enable separate sites to share news articles • Avoid duplication of content • Avoid multiple publishes for each article creation / edit • Use a tested, familiar technique
In addition to their separate target sites, all sites publish to the shared, external database
Tagging articles • Articles have custom metadata to indicate appropriate audiences • Alumni, current students, faculty, etc. • Also, path and Site ID are informative • Live sites can select appropriate articles using these criteria
Overview • Set up external database • Set up Administration assets in Cascade • Create content assets in Cascade • Create PHP Web page that can perform live queries of external database
Set up external database • MySQL 5.0+ required • Grant access to Cascade Server • Grant access to production Web servers • May want direct access (e.g. Navicat) • Follow security practices (omitted here)
Set up external database • External database schema is set by Hannon Hill • We’ll look at schema later
Set up CascadeAdministration assets • Transport • Target • Destination • Template • Configuration Set • Metadata Set • Data Definition • Content Type
Transport Site Id User
Transport “Test Transport” option appears when a Transport is selected Test
Target Base Folder Out. File Ext.
Destination DB Transport
Configuration Set • We create a new Set here • One Configuration pointing to new DBP Template • Would likely make sense to add DBP Configuration to one of your existing Configuration Sets
Metadata Set • Custom (“dynamic”) metadata will be used to make the news articles easily selectable • Here, we add “audience” information, i.e. indicate which audiences would be interested in the news article
Metadata Set • When creating / editing a page, custom metadata will look like:
Site ID cascades up • Some administrative assets are specific to a site number, i.e. the Site ID • Transport • Destination • Target • Template • Configuration Configuration Set • Content Type
Create content assets • Create Page with new Content Type
Create content assets • Create Page with new Content Type
Now we’re getting tothe good stuff • Let’s publish a page from the general site – Site ID 1
Peek at the DB • External database contains five tables • page • metadata • metadata_custom • file • folder • We’re concerned with the first three
Table: page • After first Page publish, we have 1 record:
Table: page • After first Page publish, we have 1 record:
Table: metadata • One record, with the fields you know from a Cascade’s Wired Metadata pane: idhere matches page.metadata_id
Table: metadata_custom • Here, we have two records for the page, because we selected two checkbox values First record Second record Foreign key page.id