Thundered

Ramblings of a Teenage Boy.

Entries posted in "Online"

Expression Engine: Making a Photo Blog

ExpressionEngine is a very flexible content management system. You can use it to manage different weblogs, all from the same control panel. This leads me to the topic of using ExpressionEngine to create a photo blog, similar to the one found here.

Tutorial

  1. Log into your control panel and hover over the tab titled "Publish". There should be a drop down menu and in the drop down menu, select Edit Weblogs.
  2. At the top of the page, there should be a large green button that says Create a New Weblog. Click on it.
  3. Fill out the form. Here is what I used to fill out my form:
    • Full Weblog Name: Photo
    • Short Name: photo
    • Duplicate existing weblog's preferences: Do not duplicate.
    • Edit Group Preferences: No (for now)
    • Under the second box that says Create New Templates For This Weblog?, select Duplicate an existing template group and select the default template group.
    • New Template Group Name: photo
  4. Now your new weblog should be created... but wait! We're not done yet! We still have to create our custom fields! Go to your Admin tab, click it, and under Weblog Administration, select Custom Weblog Fields.
  5. Like always, there should be a large green button at the top right hand corner that says Create a New Weblog Field Group. Click it, and create your new weblog field group (I titled mine "Photo").
  6. After you've created the weblog field group, go back to the page where all the groups are listed, and find your new field. Click on it, and you'll find that you have no weblog fields! Our friend, the green button, is in the top right hand corner, as always. Click him. Here is what I used to fill out my form.
    • Field Name: photo
    • Field Label: Photo Image
    • Field Instructions: These are just instructions that go on the publish page. You should know what you're going to do with this, so you can leave it blank if you want.
    • Field Type: Textarea with one row.
    • Default Text Formatting for This Field: XHTML
    • You can just ignore the rest of the things.
    .
  7. After you've created the field that your image link is going to go in, you have to create the place where you're going to write your summary about the photo! Again, go to the main page where all the field groups are listed, click on the field group that you created earlier, and once again, click on our green friend that creates new fields. Here is what I used to fill out the form:
    • Field Name: photo-summary
    • Field Label: Photo Summary
    • Field Instructions: These are just instructions that go on the publish page. You should know what you're going to do with this, so you can leave it blank if you want.
    • Field Type: Textarea with six rows.
    • Default Text Formatting for This Field: XHTML
    • You can just ignore the rest of the things.
  8. Now that we've created our fields, go to the Publish tab once again and click Edit Weblogs. Find your corresponding weblog and click Edit Groups.
  9. Where it says Field Group, put your newly created field group (mine was called Photo).
  10. Now that we've assigned our field groups to our weblog, we can go about editing our templates so they display our newly created fields! Click on the templates tab, and select the template that corresponds with your new photo weblog (mine was named photo).
  11. Click on the index template page, and at the top, add this line {assign_variable:my_weblog="photo"} {assign_variable:my_template_group="photo"}. If you've named your weblog and template something else besides "photo," change the code to match your settings.
  12. Here's the part that will vary between people (because we all don't have the same template code). Find the place that usually says {summary} {body} {extended} and replace it with {Photo} {photo-summary} . This will make our custom fields show up.

Extras

If you want a separate category group for your photo blog, here is how you would accomplish that!

  1. Click on the Admin tab and select Category >Management.
  2. Click on the large green button that says Create a New Category Group and well... create a new category group (can't be much clearer than that). I named mine "Photo".
  3. After that, click on the Publish tab and under the drop down menu, select Edit Weblogs.
  4. Find your photo blog and click on Edit Groups.
  5. Under the box that says Category Group, select your newly created group.
  6. To add categories to your group, click on the Admin tab, and then go to Category >Management.
  7. Find your category group and beside it, there should be an option to Add/Edit Categories.

That wraps up this tutorial on how to make a photo blog in ExpressionEngine! This tutorial was inspired by Brent. If you have any questions or are having problems with the tutorial, feel free to email me at alex.thundered[at]gmail.com.

Posted in Online,coding,expression engine, on July 29, 2008 at 06:06 AM
Permalink

Expression Engine: Pages

ExpressionEngine Core doesn't come with a pages module, so you can't create "pages" in the traditional sense without paying for the personal license. However, there is a workaround of some sorts. The structure of these faux pages is to create a weblog for each section of your website and then each page will be an entry under these weblogs. It may sound confusing, but it'll make more sense once you finish reading this tutorial.

Tutorial

  1. Click on the Publish tab and under the drop down menu, select Edit Weblogs.
  2. Click on the green button in the top right hand corner that says Create a New Weblog. Under the different input forms, here is what I put, if I were creating a weblog to house the pages about me
    • Full Weblog Name: About
    • Short Name: about
    • Duplicate existing weblog's preferences: Do not duplicate
    • Under the box that says Create New Templates For This Weblog?, select Duplicate Existing Template Group and select the main default blog template that you're using. Then, underneath that, write About (if you're creating a section about yourself/your website).
  3. Now that our weblog is created, click on the Template tab and find the newly created template group that corresponds with your weblog (mine is called About).
  4. Click on the index template and put this code at the top. {assign_variable:my_weblog="about"} {assign_variable:my_template_group="about"}.
  5. Unless you want comments on your weblog, delete the stuff pertaining to comments and pagination.
  6. Also, in the area that says exp:weblog:entries, find the part of it that says Limit and set it as limit="1". For reference, this is how my index page looks:
    {embed="includes/header"}
    {assign_variable:my_weblog="about"}
    {assign_variable:my_template_group="about"}
    <div id="main">
    {exp:weblog:entries weblog="{my_weblog}" orderby="date" sort="desc" limit="1" disable="member_data|trackbacks"}
    <h2>{title}</h2>
    {summary}
    {body}
    {extended}
    {/exp:weblog:entries}
    </div>
    {embed="includes/footer"}
  7. Now that we have our templates ready to go, hover once again over the Publish tab and select your weblog. Then, write the post that will serve as your main "about" page. But before you click the Publish button, we have to edit our settings a little! At the top, click on Options and make sure that you have checked Make Entry Sticky.
  8. To create other pages under this section, just go to your Publish tab, find your weblog under the drop down menu, and write a new entry. You can link to your new page as yourdomain.com/sectionname/page/.

Now your section/weblog should be up and running. You can view it at yourdomain.com/index.php/sectionname or yourdomain.com/sectionname if you've used your .htaccess to get rid of the index.php. If you have any questions about this tutorial, feel free to email me at alex.thundered[at]gmail.com.

Posted in Online,coding,expression engine, on July 15, 2008 at 08:49 PM
Permalink