Download presentation
Presentation is loading. Please wait.
Published byAngelica Dawson Modified over 9 years ago
1
Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit Mercy
2
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’s Database Publishing? 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’s Database Publishing?
3
What is Database Publishing?
4
Cascade Server
5
External Database
6
Cascade Server External Database Site A Site D Site 5 Site B Site C
7
Dynamic sites are…
9
Example: UDM news articles
10
UDM’s sites College of HealthProfessions BusinessAdmin.www (General site) School of Dentistry College of Liberal Arts & Education Alumni College of Engineering & Science
11
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 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
12
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 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 …
13
Sharing isn’t always easy Upgrade to version 5 broke it
14
Database Publishing offers a better way
15
“DBP” for short (“DaBaPu” didn’t test well)
16
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 Enable separate sites to share news articles Avoid duplication of content Avoid multiple publishes for each article creation / edit Use a tested, familiar technique
17
How to do it with DBP?
18
In addition to their separate target sites, all sites publish to the shared, external database
19
Sites can now select from all news articles
20
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 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
21
How does it work?
22
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 Set up Administration assets in Cascade Create content assets in Cascade Create PHP Web page that can perform live queries of external database
23
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) 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)
24
Set up external database External database schema is set by Hannon Hill We’ll look at schema later External database schema is set by Hannon Hill We’ll look at schema later
25
Set up Cascade Administration assets Transport Target Destination Template Transport Target Destination Template Configuration Set Metadata Set Data Definition Content Type
26
Transport
27
Site Id User
28
Transport Test “Test Transport” option appears when a Transport is selected
29
Target Out. File Ext. Base Folder
30
Destination DB Transport
31
Test Destination
33
Template
34
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 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
35
Configuration Set
36
Bear with me …
37
Data Definition
38
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 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
39
Metadata Set
40
When creating / editing a page, custom metadata will look like:
41
Content Type
42
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 Some administrative assets are specific to a site number, i.e. the Site ID Transport Destination Target Template Configuration Configuration Set Content Type
43
Create content assets Create Page with new Content Type
44
Create content assets Create Page with new Content Type
45
Now we’re getting to the good stuff Let’s publish a page from the general site – Site ID 1
46
Peek at the DB External database contains five tables page metadata metadata_custom file folder We’re concerned with the first three External database contains five tables page metadata metadata_custom file folder We’re concerned with the first three
47
Table: page After first Page publish, we have 1 record: id4 account_id1 site_id1 cms_idcef30e52c66d185201260e7b6b1a1634 folder_id67597412c66d1852000369bbff883f8b metadata_id1736 namewww-page-1 pathwww.udmercy.edu/dbp/page-1 content This is a headline This is REVISED body text, in a p element. This is some more, plus a picture, below: A link to the home page.
48
Table: page After first Page publish, we have 1 record: id4Table’s auto-increment key account_id1Always 1 site_id1Set in Transport cms_idcef30e52c66d185201260e7b6…Page’s ID in Cascade folder_id67597412c66d1852000369bbf…Folder’s ID in Cascade metadata_id1736Foreign key metadata table namewww-page-1Cascade system name pathwww.udmercy.edu/dbp/page-1Cascade path (≠ published path) content This is a headline This is REVISED body text, in a p element. … XML of the page’s DEFAULT region. (Would include any transformations applied to the DEFAULT region.)
49
Table: metadata One record, with the fields you know from a Cascade’s Wired Metadata pane: id account_id site_id display_name title summary teaser keywords description author review_date start_date end_date last_published_at last_published_by created_by created_at updated_by updated_at idhere matches page.metadata_id
50
Table: metadata_custom Here, we have two records for the page, because we selected two checkbox values id51 account_id1 site_id1 file_id[Null] folder_id[Null] page_id4 fieldaudiences valueAlumni id52 account_id1 site_id1 file_id[Null] folder_id[Null] page_id4 fieldaudiences valueStudents Foreign key page.id First recordSecond record
51
Time to share Repeat steps, from Transport up, for another site (Business) with Site ID 2 Publish a page from the Business site to the external database Now the DB contains data published from two separate sites Site ID 1: general site (www) Site ID 2: College of Business site Repeat steps, from Transport up, for another site (Business) with Site ID 2 Publish a page from the Business site to the external database Now the DB contains data published from two separate sites Site ID 1: general site (www) Site ID 2: College of Business site
52
Tables after Site 2 publish (Selected fields) page metadata
53
Tables after Site 2 publish (Selected fields) metadata_custom
54
Create PHP Web page PHP to connect to database
55
Create PHP Web page The SQL we’ll use in this PHP page
56
Create PHP Web page PHP that queries DB and creates link list Note http:// and.htm
57
The result
58
You will need to add another Configuration to actually publish the news article to the Web server so the links will work
59
Thank you!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.