Weblogs and Settings in Our ExpressionEngine Website

We have downloaded, installed and setup our development site, and have a blank slate installation of ExpressionEngine to work with.  Our next set of steps involves customizing ExpressionEngine to fit the needs of this particular website.  In the same areas of the Control Panel (CP) that we previously removed default records and settings, we will dive back in to set the engine up.

Here, we will go through the Admin area of the CP and get the engine setup to our liking.  Keep in mind that these are methods that I have established throughout my workflow, and there may be other ways to setup a site.  I invite you to contribute anything you have to add in the comments for all to read.  Also, I intended to include the Templates setup in this article, but it turned out pretty long.  We’ll cover Templates in the next installment.

Let’s start at CP > Admin > System Preferences > General Configuration page and make a quick change.  This one is purely personal preference.  ExpressionEngine, by default, calls its content streams “Weblogs”.  I find that term to be constricting in its scope, so I prefer to call them “Sections”.  You could call them “Giraffes” if you like, even.  Whatever you choose, type it in lowercase letters into the Section Designation Word field and click Update at the bottom of the page.

Next, go to Admin > System Administration > Section Administration (or Weblog Administration if you didn’t make the previous change.  Or Giraffe Administration). In this area we will setup everything we need to create our dynamic sections of content.

Let’s start at the bottom with Global Section Preferences.  Change “Use Category URL Titles In Links?” to Yes.  This will show a friendly URL when a section category is being shown.  So, this:

www.babyfilter.com/topics/category/diapers/

rather than

www.babyfilter.com/topics/C8/

Much nicer on the brain, don’t you think?  Click Update and we’re done here.  Return to Section Administration.

Next we’ll move up the list of areas to Custom Entry Statuses.  We removed the default status group in part two of this series, so let’s set up a new group that suits our needs.  Click the big green button on the upper right to create a new status group.  We’ll want 2 groups for this site.  One specifically for topics, and the other will be more generic, for other sections like our FAQ.  Let’s call the first group “Topics” and the second one “Default”.

Once you have created the groups, you’ll populate them with some statuses.  Click Add/Edit Statuses next to the Default group.  You’ll see that Open and Closed have been added automatically by the system.  Think of these as Active and Inactive, or Visible and Invisible.  Any section that uses the Default status group can have a status of Open or Closed applied to each entry in the section.  Its a pretty simple concept.  Click Submit and we’re done (no, we didn’t make any changes here).

Back on the Status Groups page, click Add/Edit Statuses next to the Topics group.  We’ll add two new statuses to Open and Closed.  On the right, in the box labeled Create a New Status, type Flagged into the Status Name field and CC6600 into the Highlight Color field.  Click Submit and then repeat the process, this time adding a name of Removed and color of CCCCCC.  You should now have a total of four statuses for the Topics group.  The colors we assigned are orange for a flagged topic and grey for a removed one.  Topics on Babyfilter.com are either active, inactive, flagged or removed.  In a list of topics in the CP Edit tab, the orange flagged posts will stand out easily, and the grey removed ones will do the opposite.  We’re now finished with status groups.

Return to Section Administration and click Custom Section Fields.  Field groups are completely customizable fields that you can add to each section.  You can create any number of fields and choose from quite a few attributes for each field, as you will see.  Click “Create a New Section Field Group”.  We’ll need 2 groups here.  Topics and FAQ.  Creating field groups is just like creating status groups, so go ahead and create a field group called FAQ, and another called Topics.

Let’s start with the easy one- FAQ.  Click “Add/Edit Custom Fields”.  You’ll see that there are no fields, and we are going to add just one.  Click the big green button on the upper right, and you’ll see the custom field form.

  • Field Name: cf_faq_answer.  This reads like “custom field in the faq section with a field name of answer”.  Why not just “answer”?  Imagine if this field was named “body” and you had four sections, each of which having a body field.  Not only would it be confusing, but ExpressionEngine requires unique field names.  So you’d likely end up with body, body1, body2, body3, which is not semantic and is just plain confusing.  With this method, we could have cf_blog_body, cf_article_body, cf_news_body, etc.  Simple to decipher and easy on the system.
  • Field Label: Answer.  This is the field label shown on the publish and edit forms.  It should be easy to understand and descriptive.  These are not required to be unique so keep it simple but useful.
  • Field Instructions: “The answer to the FAQ question posed in the Title field of this entry”.  Yes, those are the instructions for this field.  This may seem confusing at first glance, but what you may not know is that every entry of every section has a Title field by default, and this field cannot be renamed.  So, in the FAQ section, we’ll be using the Title field for the FAQ question, and the cf_faq_answer field for the answer to that question.
  • Field Type: For this field we want a Textarea.  Most of the common form field types are available here, as well as a more complicated field type called Relationship.  In this case a simple 6 line Textarea will give us enough room four our FAQ answer.  If you need different field types from the default choices, there are some great extensions in the ExpressionEngine community that add even more field types to the list we have to choose from.
  • Default Text Formatting: XHTML; Display Formatting Menu: On.  For custom fields you can specify how ExpressionEngine will format the field contents when displaying it on the website.  We want XHTML, which preserves line breaks in the text area as we type the content, converting single breaks into br tags and double breaks into paragraph tags.  Other tags can be manually written into the content of this field, like h1-h6, ordered and unordered lists, and other HTML.  But it will always respect the line breaks.  The Auto-br choice will only convert line breaks to br and will not create any paragraph tags, and the none setting will not respect any line breaks at all.  For most fields I create with ExpressionEngine, its either XHTML or none.
  • Text-Direction: Left-to-right.  This will never change unless you have a localization that reads right to left.
  • Is this a Required Field: Yes.  In this case, what good is a FAQ question without an answer?
  • Is Field Searchable?: Yes. In this case, in a site search, or a search dedicated to the FAQ, we want both questions and answers to be searched for the user.
  • Show this Field by Default? Yes.  In this case, we always want the Answer field shown when in publish or edit mode.  The alternative is that the field is collapsed and a + button must be clicked to reveal the field itself.
  • Field Display Order: 1.  All the custom fields for this group can be ordered so they make the most sense.  There is only one custom field in the FAQ group, so 1 it is.

Click Submit and your field will be created.  That is all we need to do for FAQ, but there will be more practice with this tool for the Topics field group.  Click “Add/Edit Custom Fields” next to Topics and add the custom fields as detailed below (Remember, the Title field is already in the system by default):

 

Field Name Field Label Instructions Field Type Default Text Formatting Required? Searchable?
cf_topics_topic Topic The main question posed by the user. Textarea XHTML Yes Yes
cf_topics_extended Extended Topic Further details added by the user. Textarea XHTML No Yes
cf_topics_tags Tags Related keywords for topic

Text
Input

None No Yes

OK, we’re all set with our custom fields for both of our sections.  Let’s move on to Categories.

Back at the System Administration page, click Category Management.  This will allow us to define any number of categories to attach to any entry within any section.  Think of them like categories in a blog.  Just like statuses and fields, we can create unique groups of categories for each section.  We will create two category groups, again, one for FAQ and one for Topics.  Click the big green button to create the groups and title them appropriately.  Don’t worry about the HTML formatting field on the create page. 

Starting with the FAQ group, click “Add/Edit Categories”.  For this group, we just need one category right now.  Type FAQ into the Category Name field.  You’ll see the category URL Title field populate automatically. 

We won’t need any other fields filled out here, though you can insert an image and description for each category if you want.  These fields could potentially be used as an introduction and representative image when viewing entries within this specific category on the website.  This is well demonstrated on a previous site we’ve built, 50+Fabulous.  You can see here that there is an image and text introduction to this Finance category.  It works very nicely.  However, we don’t need this feature for BabyFilter.

Click Submit and we are finished with FAQ.  Why add one category?  I prefer to have a category group assigned to each section and setup ExpressionEngine to assign a default category to each entry within that section, just so these relationships are defined from the get go.  Adding categories to the FAQ later, if we need to, will be a piece of cake.

For Topics, we do have quite a list of categories to enter.  Return to Category Groups and dive into the Topics group.  Enter the following list of 24 categories: Activities, Baby Gear, Baby’s Room, Bathing, Behavior, Carseats, Childcare, Clothing, Communication, Diapers, Education, Feeding, Furniture, Health, Learning, Mobility, Nutrition, Pee & Poop, Safety, Sleeping, Strollers, Teething, Toys, Travel.

OK, we’re rocking now.  We are ready to set up our sections.  These are the core content streams for our ExpressionEngine site.  All the work we’ve done to this point is in preparation of setting up the sections.

Still working in Section Administration, click Section Management.  Since we deleted the Default Weblog in the last installment, there is nothing here.  Let’s create two new sections…you guessed it- FAQ and Topics.  Use the big green button to do so.  In the New Section screen, you’ll just fill out the Full Section Name and Short Name fields.  So, for FAQ, just fill in FAQ as the full section name and faq as the short name.  Click Submit.  For our Topics section, you’ll just fill in Topics and topics and click Submit.  The full section name is a friendly name for use in the CP and on the site, and the short name is for use in your code where you write EE tags.

Out sections are now created, so lets make them fat and meaty.  On the Section Management screen, click Edit Groups next to the Topics section.  For each field of Category Group, Status Group and Field Group, select Topics.  What you are doing is assigning the categories, statuses and fields that we have already created to the Topics section.  Now, any given entry in the Topics section can have one or more of the 24 categories, can have a status of Open, Closed, Flagged or Removed, and can have data in any of the custom fields we setup for Topics.  That wasn’t too hard, now was it? 

Go ahead and repeat this Edit Groups step for the FAQ section.  The only difference here is that we didn’t create a specific set of statuses for the FAQ section.  Just choose the Default status group, which will allow our FAQ questions to either be Open or Closed.

Now, the final haul in this article- editing the preferences for our two sections.  I’ve saved the most in depth part for last.  So, go grab a Red Bull or cappuccino and buckle down for the last lap.  There are lots of preference settings.  What you’ll soon see, though, is that ExpressionEngine makes some smart assumptions to get you started.  And, as with many other areas in this system, once you set up these preferences a few times, you’ll be able to power through them in a few minutes.

Let’s begin with the Topics section.  On the Section Management page, click Edit Preferences next to Topics.  The General Section Preferences page comes up.  The default settings on this page will be fine.  If you wanted to change the name and short name of this section, you’d do so here.

Skip Path Settings, we’ll come back to this after our templates are setup.  Click on Administrative Preferences.  Here you can see further benefit of setting up statuses and categories before the section preferences.  Since our groups have been assigned, we can now choose a default status and category for new topics that are created, if we desire.  Since our users will be creating topics when they use the site, we want those new topics to be live as soon as they are submitted.  So, in this case, Open is the best choice for the Default Status.  As for the Default Category, we want the user to choose this wen they submit a topic, so we will leave None selected and won’t force a category here.  However, we will need to force a selection on the topic creation form.

The following two radio buttons allow us to set a default for allowance of comments and trackbacks on new topics.  We definitely want comments enabled for all topics, but we won’t be allowing trackbacks on BabyFilter, so choose No.  Finally, the last dropdown allows us to choose which custom field will be shown in search results, if we choose to show anything beyond the title.  Topic should be chosen by default here and that is the best choice for us.

Click Section Posting Preferences.  This allows us to set some default formatting behaviors for our topics.  For the Default HTML Formatting in section entries, we can choose to allow all HTML, safe HTML or no HTML.  We’ll choose Allow Only Safe HTML so that our users can post links, make things bold, italicized and other non-harmful enhancements.  If we allowed all HTML, we’d be opening our form up to potential abuse.  Given the nature of the site, basic HTML ought to be fine.  We’re going to select No for Allow Image URLs in Section Entries, so that users may not post images within their topics.  Finally, we do want to automatically turn URLs and email addresses into links, as this will make it easy for users to post links and email addresses safely.

The next area is Versioning.  We’re not going to enable versioning for topics, so we’ll skip that one and leave the default No choices alone.  On to Notification Preferences.  In this area we can specify who, if anyone, will get notified if new topics or comments are posted.  These features are quite nice, as the engine will send out emails whenever certain actions happen.  Click Yes on all three choices, and in the two text boxes, type admin@babyfilter.com.  This way, when a new topic or comment on a topic is posted, the site admin will get an email notification.  As well, when a comment is posted, the topic author will get an email notification.

Next, click Comment Posting Preferences.  We do want to allow comments for topics, but we also want to require membership to comment.  So the first two radio buttons should be Yes.  Normally I would enable the captcha for comments, but instead of the default captcha, we’ll be installing a Recaptcha plugin that offers better spam blockage.  More on that later.  The only other change we need is to add a 120 second interval between comment submissions.  This is another way to stop automated comment spam.  Here are our selections:

The next area is Trackback Preferences.  Since we removed the Trackback module earlier, these are set to No by default.  Easy!  Move on to our final area, Publish Page Customization and make these options Yes: Display URL Title Field, Display Author Menu, Display Status Menu, Display Date Fields, Display Option Buttons, Display Category Menu.  All others should be No.  These options define what modules show up on the publish/edit page for any given topic.  This screen makes it easy to turn off anything we don’t need.  Finally, click Update and Finished, and we are through with the Topics Section Preferences.

WOW that was a lot of clicking!  Let’s do it all again, for the FAQ section…quicker this time!

  • Default Category: FAQ
  • Select “Allow Comments”: No
  • Select “Allow Trackbacks”: No
  • Allow Image URLs in section entries? No
  • Allow comments in this section? No
  • Display Status Menu: Yes, All others: No

As you can see, there were just a few changes in all those Section Preferences that needed to be changed.  Much of the difference here is that topics will be created on the front end by users, and FAQ questions will be created in the CP by administrators. 

That is (finally) the end of this installment.  It was long and detailed, but we made it through.  We still don’t have anything to show on our staging site (until I write more articles!), but that will begin taking shape in the next article.

Series Introduction
Next Article in Series
Previous Article in Series

 

Leave a Comment

 Remember Me?

 Notify Me of Follow Up Comments?

Are you human? Leaves on a tree are usually what color? (5 character(s) required)