This post originated from an RSS feed registered with PHP Buzz
by Forum One.
Original Post: Thinking Like SyntaxCMS: Publishing
Feed Title: Syntax Framework
Feed URL: http://blog.syntaxcms.org/rss.php?version=0.91
Feed Description: Finally, a place to answer Syntax questions
This is part of a series on how to think like SyntaxCMS.
When last we spoke, we covered the components of SyntaxCMS from a conceptual standpoint. Now let's look at how some of these components interact in the first ways you'll probably want to use them in a real site: publishing.
Publishing always involves site sections in one way or another. The simplest way to think of a bare-bones SyntaxCMS site is just a site full of sections, analogous to pages in a book. One can publish pages to different sections of the book. So if you have a home section, you can publish a page About Us, another one with a way to Contact Us, and maybe something about the Projects you're undertaking. These can have HTML just like a blog post (ahem).
So to do this, you create a site section and then publish it to another site section. The new site section becomes a child, and your original site section, the one you're publishing the new one to becomes a parent. In fact, the relationship is hierarchical , so we can talk very much like a family tree--albeit the family tree of a bunch of asexually-reproducing amoebas, but even amoebas have to come from somewhere.
So another new site section published to the one you just created is a grandchild of the original site section. The original site section (and its parents) are ancestors of the site section you just created. If you go to your site and look from the home page, all these site sections you just created are descendants of the great grand-site-section of them all, the home page.
That sort of site, known colloquially as brochure-ware, is not terribly interesting, and it doesn't take advantage of SyntaxCMS's ability to use different content types and mix them all together. So say you don't want just a boring document library, but you have some text about applying for Jobs at your organization, and you create a site section for it and publish it to your About Us site section. But you also need some sort of form that applicants must sign before their employment application can be processed by HR. The SyntaxCMS way is to create a document object and then use the publish tab to publish it to the Jobs site section. You go to the jobs page, and sure enough, there's your text and a link to and description of your form.
But what if you're participating in a job fair? You can create an event object and publish it to that same page, so it shows up right after your form. Now you have a pretty complete Jobs page with some text, a form, and an event. Three different content types (site section, document, and event) coexisting for no other reason than their content is about jobs, which is how you think about finding them. People don't think "Hey, I'd better look in the Documents section for any jobs form, and the calendar for any jobs-related events, and then the Jobs page for any information about openings," they think "Hey, I should click on the Jobs page and see if there is anything there and how, where, and when to apply."
But say you've been having a hard time finding decent help and you'd like the job fair announcement to be featured more prominently, but it should still be there for the hopeful worthies who have bookmarked your Jobs page, awaiting breathlessly your next opening. In fact, the boss comes in and says he wants it on the home page, ASAP. Well, if you have the default configuration, all you do is publish that same event to the home page site section as well as the Jobs site section.
This should give you a taste of how SyntaxCMS lets you put information where it makes sense, even if it needs to be in multiple places. There's no retyping or copying and pasting, just click a couple of buttons in the admin area. And if, in the future, you have different types of jobs, all of whom need their own page, you can just keep adding new site sections and publishing them to the Jobs site section so users can drill down. Each of them can have their own form, or you can make sure that the original form is there on each of those pages.
But what if the job fair event has an admission form that applicants should fill out before attending? That gets into relationships, which we'll cover in the next part of this series. In fact, we'll find out that publishing is actually a special case of relationships in SyntaxCMS. For now, think about the myriad ways you can present the same information just by publishing content objects to site sections or forming a hierarchy of information by publishing site sections to one another.