Hey EE party people,
I’m brand new to EE, and I’m really impressed so far. I’m building a new site - it’s essentially a mechanism for our client to capture and present the results of a body of research they have done. (That’s simplified, but should do for the point of this post, I hope.) I’m wondering I could get some feedback on my data organization strategy and nav building technique.
I’m thinking I’ll need 2 weblogs: 1) one with several text areas to hold general info about the site itself (title, introduction, purpose, description, etc); and 2) one with several text areas to hold info about the results of tests being run (conclusions, positives, negatives, quotes from test subjects, etc). There will be only one entry in the first weblog (there’s only one study), but there will be about 5 in the second (approx 5 test have ben run).
I want 3 sections for the site: 1) Home page populated with some data from the first weblog; 2) Intro section with 4 subpages, all populated with data from the first weblog; 3) Testing results with a subpage for each test, each populated from an individual entry the second weblog. For navigation, I want a top level nav that shows those 3 sections, and a subnav for section 2 and 3.
I ran into some difficulty making the subnavs for sections 2 and 3 becasue their built differently. Section 3 subnav was fairly easy b/c each page uses the same template populated by the different weblog entries. The following worked well (open list, select weblog, generate list items for each entry, close list)-
<ul class="sub-nav">
{exp:weblog:entries weblog="second"}
<li><a href="http://{title_permalink=group/section-3-template}">{title}</a></li>
{/exp:weblog:entries}
</ul>So far so good. Client can even add or remove entries in the second weblog and subnav changes to match. Sweet!
But it doesn’t seem so easy for Section 2’s subnav because each subpage holds only a subset of the first weblog’s single entry. Plus the sub pages are static. For client-based reasons, there will just be 4 defined pages pulling appropriate data from the first weblog. So I built this subnav thusly-
<ul class="sub-nav">
{exp:weblog:entries weblog="first"}
<li><a href="http://{path=group/section-2-sub-1-template}">Sub 1</a></li>
<li><a href="http://{path=group/section-2-sub-2-template}">Sub 2</a></li>
<li><a href="http://{path=group/section-2-sub-3-template}">Sub 3</a></li>
<li><a href="http://{path=group/section-2-sub-4-template}">Sub 4</a></li>
{/exp:weblog:entries}
</ul>Now that too works just fine - each subpage has it’s own template which pulls the appropriate data from the weblog.
So with that long winded intro, my quesions to you all-
1) Does this strategy make enough sense for you to say if that’s generally how you’d do it or not?
2) All of the templates in Section 2 are the same, except that they each snag a different text field from the weblog. Seems like I should be able to have just one template with some logic to figure out with field to grab. Is there a way to pass a variable in the href link (ie “sub-1”) to work some logic in the template?
Really enjoying working with EE. Thanks in advance for your time helping a newbie.
-Willhaus