Output Format feature [core]


This is certainly an extension of the layout.

The idea is pretty simple: support different extensions for the same page and depending on the extension return the content in that specific format (i.e. .html would be considered the default, then you could use .pdf to retrive the page as a PDF file, .prt to get a printer friendly version, .eml to get an email friendly version, etc.)

Using a Book like feature, we can create a whole tree and thus the PDF file can include all the pages of the book.

Default Format

It should be possible for a page to indicate the format in which it should appear by default. This would mean that without an extension that specific format is used. The system default is always HTML and an extension is always respected.

Header Link

To let search engines (and smart users) know of those extraneous formats, the HTML <head> tag will include <link>'s of related pages. The other formats may include such links if possible.

Supported Formats

The following list are formats we quickly want to support at least on a per page basis. These are useful for many websites as noted below: HTML, text, PDF, email. Other formats are certainly useful but less important.

  • HTML

This is the default format and will obviously be supported (and will most certainly not even be removable.)

  • Text

Once in a while, you want to write a text document. For example, software often comes with a license that's written in a text format. This way it can thus be output by itself instead of within an HTML document which often prevents easy copying of the legal document.

This is also useful to create pages representing emails that will be sent in text format (as a user may require to only receive text emails.)

  • PDF

PDF is very well supported today and is still growing. Many people make use of that format for all sorts of reasons such as a way to save an invoice or print a page.

The PDF can also be used to save statements. PDF can represents forms to be printed and mailed or faxed.

In case of a book structure, we can generate the entire book in the PDF.

Note: Evince comes with a library (libevdocument) which can be used to handle the rendering of PDF files. There may be other libraries that allow for additional PDF handling.

  • email

The email format generates the necessary output for an email. It should support several modes as defined by our users and administrators:

  1. email in text only
  2. email in HTML only
  3. mixed email (text + HTML)
  4. email includes all the data (attachments, images, styles, etc.)
  5. email only has the HTML body, the data remains on the server
  6. links get tracked (i.e. sends users to a shortened URL that counts/track the clicks)
  7. add a signature
  8. make use of a specific header/footer

This format is used internally to generate emails. This means all messages to be emailed can be created as page documents (and thus translated, use our tag feature, etc.)

  • .tar, .ar, .shar, .zip, .cpio

In case of a book structure, this format can be used to retrieve all the pages. We'd need to know the format of the pages though (i.e. HTML, PDF, text...)

Some of the extensions (i.e. .tar, .ar) also supports a compression extension (i.e. .gz, .bz2, .7z, etc.) We also want to support combined extensions such as .tgz.

  • .iso

This is a quite interesting feature where the book structure comes out in a file that can be burned on a CD. A .iso can also be read using tools such as mount on Unix and libarchive on other systems.

  • mtree

This format does not include data, instead it only includes the tree of files and some meta data (such as an md5 for example.)





Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly