Getting started with the CMS module of Bright Content

Initial set-up

For now unfortunately you need to install a few separate packages. BCMS will soon be rolled into the main BC package. Install BC and prerequisites, e.g. following examples at Bright_Content/Sample_setups.

Then install BCMS. For example:

hg clone http://hg.4suite.org/zepheira/elarson-stc bcmsprototype
cd bcmsprototype
cd OpenIDClient
python setup.py develop
cd ../bcms
python setup.py develop
cd ..

Then launch the server

paster serve --reload development.ini

There are no pages at first, so go to the admin interface to add one:

http://127.0.0.1:5001/admin/

You'll be prompted for your OpenID. You can control what OpenIDs are allowed to admin your site by editing cms_app/openid_users.txt. Upon successful authentication you'll be redirected to the admin page. Ignore the "Core Data" and "Comment Moderation" links for now. Click on Pages ( http://127.0.0.1:5001/admin/pages/list/ ). Click "New".

You'll be prompted for a URL and a template. Pick a URL, e.g. "bcms". Use the template cms_app/tests/new_page_template.xslt. Set "Draft" to "no".

You'll see the new pages listed at http://127.0.0.1:5001/admin/pages/list/ . You can click directly on the entry link to see it rendered.

Ongoing page management

A page is defined by its content, URL and status (draft or production) generally built from a data set and an XSLT template (other template systems will be supported in future), generally part of a theme. Each page then is the result of the template stylesheet applied to the core data file.

Create a template

You can use the demo frame template cms_app/templates/cms/demo/frame.xslt, and the sample page template cms_app/tests/new_page_template.xslt for example.

Create a URL and Add a Page

To create a page, you can copy the above example and place it in a file for editing. After you have added any HTML you wanted to the "maincontent", you can add the page to the site. To add a page go to the administration area (http://semantic-conference.com/admin) and click the "Pages" link. There you will see a listing of the current pages that have been created. If there no pages currently, nothing will be listed. Clicking the "new" link will show forms for adding a page. [Note: You must have an OpenID account and be authenticated in order to access this area. To obtain an OpenID, visit --> https://www.myopenid.com/. Instructions on how to add, update or delete OpenIDs for site users can be found in the “Administration” section of this document.] The forms contain three fields:

site. If the "draft" is set to "yes", then it is considered a draft and it not publicly available. If the draft is set to "no", the page is considered "published" and will be made available on the site. Once you have filled in content for all three fields, hit the “create” button. At the top of the page you will see “Created!” once the operation has successfully completed.

Creating your own site setup

What you'll need

Why do I need all that?

Well, in truth you don't. This is a quick start, and if you prefer to use different content or rendering technologies.

Old notes

...file that can be edited and added to via the /admin/core/ UI. The second is a

Also, there were some small updates to the Zepheira branch of BC for updates, so make sure you have the latest from /var/local/hg/zepheira/brightcontent/ and that you reinstall via setup.py if you are using install. If you use develop, you should be fine by simply pulling and updating.

There are two example templates to use in the tests directory of the repo that give a basic example of adding a template. The test flow is as follows:

  1. Start the server and go to /admin/pages/list/
  2. Click the "new" link, which takes you to /admin/pages/new/
  3. Enter in the URL text input "battle" and upload the "new_page_template.xslt" from the tests directory, Submit
  4. Verify that the "Created" message appears and go back to /admin/pages/list/
  5. Verify the new page was created and the draft status is "yes"
  6. Visit the page by clicking the URL column link
  7. Click the edit link and change the file to be "update_page_template.xslt", Submit
  8. Go back to the /admin/pages/list/ and click the URL column link to see the updated message
  9. Go back to the /admin/pages/list/ and click the "publish" link
  10. Verify the link changed to "draft" and the draft value changed to "no"
  11. Click the "draft" link and verify the link changed to "publish" and the value changed to "yes"

Bright_Content/CMS (last edited 2008-11-24 18:46:31 by localhost)