The main premise of an ExpressionEngine website is through it’s channel assignments. Each page of content will generally have it’s own channel. To publish to a page, you have to set up a channel, and then assign channel fields/statuses and categories to make sure that the overall location of the entry is as unique and specific.

First thing first – I had to go into Admin, Channel Administration, Categories. I wanted to create the categories first and work backwards towards the channels, so that I could assign everything at once to the created channels. As you can see below, I have created 5 categories that will be the only 5 categories I use. I plan on changing ‘Dark’ to ‘Other’ just to make sure I have a wider array of material in my website.

categories - exp

Next I went to Admin, Channel Administration, Statuses. This is where I created statuses for featured and secondary images. These would only really count for the Gallery channel, as I wanted to feature an image on the home page and leave the remaining recent content as videos.

Statuses

Admin, Channel Administration, Channel fields. This was the penultimate stage for setting up my channels. Below is an example of the fields used to upload a video. They are {embed_src} for the embed source of the video, {video} for the source of the video, {video_info} for information about the video, and {which_category} for the category. I downloaded a 3rd party plugin which enabled the use of categories as a required field, something I wanted for the video uploads that wasn’t included within EE.

fields

Everything else set up, I went to Admin, Channel Administration, Channels and set up some channels. One for the blog, one for the gallery and one for videos, each named as described. There are a few parameters, for example I made sure each channel was searchable, and that each channel allowed comments – this was for future ease and compatibility with other EE modules. I assigned the field groups and statuses to the appropriate channels, and then I was ready to start publishing content.

channel pref

Once I had all of this set up, I could begin publishing content. I went to Content, Publish, Blog. I am using blog as the example publishing channel. As you can see the fields for this are simply {title} which is a default field for every entry, {url_title} auto-generated alongside the title and {blog_comment} which is the body of information involved with this entry. Other items such as author and date are automatically stamped onto the entry by EE.

blog post 1

Once I had published a post, it was time to actually set up my template to be able to retrieve the information from the database. Using the {exp:channel:entries} tag pair, I opened the channel with {exp:channel:entries channel=”blog” orderby=”date” sort=”desc” limit=”6″}. This meant it would search for entries in the channel named ‘blog’, order them descending by date and limit entries on that page to 6.

Where the placeholder content was in the html I created in DreamWeaver, I passed in the EE field names, and added a datestamp for the entry. This was then closed by the {/exp:channel:entries} closing tag.

blog post 2

Once this was all in, I clicked update, and view rendered template. As you can see below, the left image represents the page before the channel was incorporated into the template- just placeholder content. The image on the right displays a blog post as defined in the {exp:channel:entries} tag pair. Success! I will repeat this for every channel on the appropriate pages an get some content published so that I can begin work on other aspects of the site. It’s so satisfying to see it actually working!

blog post 3

Advertisements