The Blog Studio

We are internet culture creators with a focus on
DESIGN, DEVELOPMENT & SOCIAL MEDIA.

Blog > Uncategorized > Expression Engine – A handy use of URL segments to keep me from going crazy

Expression Engine – A handy use of URL segments to keep me from going crazy

Mike Dolan, 31 August, 2006 0 Comments

I had a slight epiphany this morning as I was hacking away on a site
we’re currently working on here at the blog studio. It occurred to me as
I was creating modular sidebar items within Expression Engine 1.4. I
try and keep things as modular as possible, using different files for
sidebar items like blog archive lists, mailing list forms, category
lists, recent comments, recent posts.

If you’ve used expression engine you know that this creates a minor
problem, especially when there are more than one section that have
different categories, and will use a different archive list. This means
each section needs its own archive list file, which creates one more
thing you have to remember when you’re creating your site.

Up until this point, this is how i’ve done it. Multiple files, pulling from different weblogs. Below you will see my new method:

 

{exp:weblog:month_links weblog=”{segment_1}” limit=”12” style=”linear”}

 

{month}, {year}

{/exp:weblog:month_links}

As you can see, I’m using the segment variable to pull the weblog
name. This allows you to have one single sidebar item. The advantage of
this? You don’t have to worry about creating multiple files in multiple
template groups, which requires extra work if there is a change to be
made.

Comments are closed.

Feature

We are looking forward to the holidays. We'll all be at #hohoto supporting an amazing cause & dancing our butts off. Come dance with us.

RFP

Excited? So are we! Fill out our RFP and start from there!

Request For Proposal

Facebook

Flickr

Newsletter

Subscribe to our newsletter!

Subscribe to our mailing list

* indicates required
×