help.axcms.netAxinom Logo
Save Save Chapter Send Feedback

Channels

AxCMS.net supports multiple output channels. One Page Template can be associated with multiple channels and contain one file for each channel.

AxCMS.net supports multiple Output Channels. Each channel presets the same content in a special way.

Examples of channels:

  • Default Channel - output in HTML, optimized for PC, implementing Corporate Identity
  • Print Channel - output in HTML, optimized for printer, smaller width, black/white, only content without navigational elements
  • Accessibility Channel - output in HTML optimized for accessibility requirements
  • PDF Channel - output in PDF
  • XML Channel - output in XML, only content

As you see, Channels can be used both for different presentation formats as well as in integration scenarios.

To leverage multiple channels you basically extend your page templates, providing one ASPX-file for each channel. AxCMS.net will render each page for each channel and publish all generated renditions (each in its own subfolder).

The Editor enters content in Management System using Default Channel. As long as more than one channel is defined, the Editor will get a possibility to see a preview of the current page in any channel he/she likes.

In the Live System you can specify the channel desired with an URL-Parameter "channel": http://localhost/AxCMSwebLive_Sample/page.Sample?channel=Print.

You can bind channels to the domains, e.g. all requests to mobile.domain.com automatically render the mobile-channel.


Sample: Creating a Print Channel

Take your template and develop a second version of it (print view). You can change the layout as you wish, but the only thing you MUST take care of, is that all the placeholders which are on your original template MUST be on your print view template too (you could set a panel with visible="false" around them, if some should not be visible).

Now define the two channels (in CmsSite.xml):

<Channels>
        <Channel axid="Normal" isDefault="true">
            <MenuName>Normal</MenuName>
            <FolderName></FolderName>
            <Description>Channel for presentation in CI.</Description>
            <Hosts>
                <Host>www.axinom.com</Host>
            </Hosts>
        </Channel>
        <Channel axid="Print" isDefault="false">
            <MenuName>Print</MenuName>
            <FolderName>Print</FolderName>
            <Description>Channel for print view.</Description>
            <Hosts>
                <Host>print.axinom.com</Host>
            </Hosts>
        </Channel>
</Channels>

axid: unique identifier
isDefault: This boolean defines, which version is displayed in WYSIWYG-Editor. There must be exactly one default channel.
FolderName: Each channel must have a unique folder name. Default channel MUST have an empty folder name. So all files rendered by default channel are located in publish-dir, the others are located in publish/folder name-dir.
MenuName: user friendly name for channel
Description: user friendly description of channel
Hosts/Host: You can define hosts for each channel. So if you have www.axinom.com and accessibility.axinom.com, you can define, that all pages are rendered with this channel if the page is called with one of the hosts.

Now extend your page template definition like this:

<PageTemplate axid="MyTemplate" description="My Template">
            <Files>
                <File axid="normalTemplate" channel="Normal">MyTemplate.aspx</File>
                <File axid="printTemplate" channel="Print">MyTemplatePrint.aspx</File>
            </Files>
            <Placeholders>
                <Placeholder axid="contentbigPlaceholder" type="ContentPlaceholder" />
            </Placeholders>
</PageTemplate>

Each file gets an unique axid and a channel, for which it should be used. As value for attribute channel, you must set axid of the channel.

Render Engines

The channels described here were all using standard rendering in HTML. You can re-design the templates, but the content in the placeholders will be rendered the same way.

However you can create a custom Render Engine which would convert the content (Texts, Images) into the format you need.

Axinom has already developed render engines for XML, MS Word, Adobe InDesign, Silverlight (XAML), etc.

Silverlight Template Project available for AxCMS.net Solution Providers demonstrates how to create a new rendering engine (using Silverlight example).