Hey Sean -
That article builds on a situation like this, where the left nav is generated by a weblog:entries tag (here’s the tutorial for that approach.
In that approach each weblog entry becomes an item in the navigation.
There is one template group - called “static”, and one template - the index template.
The code generates navigation to individual entries by:
<li><a href="http://{url_title_path=static}">{title}</a></li>
So an entry with a url title of “our_locations” would get a link generated of:
/index.php/static/our_locations/
The index template gets used to show the content, and it since it’s limited by url_title will only show the content from the Our Locations post.
So I have one weblog with multiple entries, the left-nav is being constructed dynamically by a weblog:entries tag looping through those entries, and the links are being fed to one template. Add or remove pages from the nav by just publishing or removing entries from that weblog.
With me?
Now - in addition to the “regular” content in that section you want to add a contact form.
You could just create the contact form, and manually add a link to it either on top of or on bottom of the left-column weblog:entries that’s building the left-nav. But you want it sorted alphabetically so it shows up in the middle of the navigation.
What to do then?
This is were my article comes in.
What I do is create the contact form in the same template group as the static content. So the static template group now has two templates - index and contact.
Then I create a dummy entry in the weblog that’s being used to build the left nav, and call it “contact”. The key here is that the url_title of the entry match exactly the name of the contact template I just made.
This is a dummy entry because the content will never be seen. Here’s why -
With the new contact entry posted, EE will loop through that weblog and build the navigation, and now it will run across the new contact entry. It will build a link to it in the same manner as all the other entries in that weblog:
/index.php/template_group/url_title/
in this case it will be:
/index.php/static/contact/
And that link will be sorted in along with all the other links to the other entries - so:
About Us
Contact
Our Locations
Etc.
Still with me?
But here’s the the key to that link loading the new contact template, rather than the index template with the weblog’s contact entry contents.
It’s all in the order in which EE looks to match URLs to backend items. When EE encounters the link of:
/index.php/static/contact/
It will first look for templates that to match that URL.:
/index.php/template_group/template/
So in this case, even though the navigation is being generated by a weblog entry called “contact”, when you click the link EE is first looking for a template called “contact”. Since there is one, EE will load it instead of the index template with the weblog’s contact post instead.
Does that help?