63 of 64
63
New Module: Structure - Uses entries to create a page hierarchy for static and listing pages
Posted: 06 January 2010 11:32 AM   [ Ignore ]   [ # 1117 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  676
Joined  02-14-2008

Hi folks,
I’m still using 1.3.1 for a charity site that I’m doing.

Been following Travis’ tutorial on http://jambor-ee.com/tutorials/structure/ which has been great.

I have the sample working on http://stage.findlayfamilynetwork.org/ - however I’m having trouble with the ‘news’.

The main news page shows fine but won’t list any news stories. The template I’ve copied from the examples provided

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<
html >
<
head>
<
title>Structure Demo</title>
<
meta http-equiv="Content-Type" content="text/html; charset={charset}" />
<
link rel='stylesheet' type='text/css' media='all' href='{stylesheet=site/site_css}' />
</
head>

<
body class="home">
    
<
div id="container">
    
    <
h1>Structure Demo</h1>

    <
ul id="nav">
        <
li{if segment_1 == ""} class="here"{/if}><a href="/">Home</a></li>
        <
li{if segment_1 == "services"} class="here"{/if}><a href="/services">Services</a></li>
        <
li{if segment_1 == "about"} class="here"{/if}><a href="/about">About Us</a></li>
        <
li{if segment_1 == "news"} class="here"{/if}><a href="/news">News</a></li>
        <
li{if segment_1 == "contact"} class="here"{/if}><a href="/contact">Contact Us</a></li>
    </
ul>
    
    <
div id="content">

        
{exp:structure:nav_sub}
    
        
<div id="content_main">

            <
p>{exp:structure:breadcrumb}</p>
        
            
{exp:weblog:entries}
                
<h2>{title}</h2>
                
{content}
            {
/exp:weblog:entries}

            {exp
:weblog:entries weblog="news" dynamic="off"}
                
<div class="item">
                    <
h3><a href="{page_url}">{title}</a></h3>
                    <
p class="date">{entry_date format="%d/%m/%Y"}</p>
                </
div>
            
{/exp:weblog:entries}
        
        
</div> <!-- close #content_main -->
    
    
<div> <!-- close #content -->

    
<div id="foot">
        <
p>Copyright &copy; nGen Works 2008</p>
    <
div> <!-- close #foot -->

</div> <!-- close #container -->

</body>

</
html>

I created http://stage.findlayfamilynetwork.org/index.php/site/test to make sure the entries loop was working and it is.

Any ideas?

Thanks,
S

Profile
 
 
Posted: 06 January 2010 11:57 AM   [ Ignore ]   [ # 1118 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  503
Joined  07-16-2005

Maybe it’s a slight code error or not closed tag - that should work… Have you tried a test page (within Structure) and ONLY having the news loop? I would strip things out and work backwards. Make sure you have a status group assigned to the news weblog also, it won’t show entries if they aren’t set to open when published.

 Signature 

Travis Schmeisser // rockthenroll


Structure: a new way to build ExpressionEngine sites

Profile
 
 
Posted: 06 January 2010 12:41 PM   [ Ignore ]   [ # 1119 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  676
Joined  02-14-2008

Default status group is assigned and all entries are set to open. I’ll go through the tutorial again. I had this working before on an older site. It wouldn’t be anything to do with being on a sub domain would it?

Profile
 
 
Posted: 06 January 2010 12:42 PM   [ Ignore ]   [ # 1120 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  503
Joined  07-16-2005

A subdomain shouldn’t matter. Definitely try with the example code and add one thing at a time to narrow the issue. Email support [at] buildwithstructure [dot] com for more help.

 Signature 

Travis Schmeisser // rockthenroll


Structure: a new way to build ExpressionEngine sites

Profile
 
 
Posted: 06 January 2010 12:53 PM   [ Ignore ]   [ # 1121 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  676
Joined  02-14-2008

Thanks Travis - appreciate that.

Profile
 
 
Posted: 22 January 2010 03:44 PM   [ Ignore ]   [ # 1122 ]  
Grad Student
Rank
Total Posts:  85
Joined  03-03-2009

Maybe I’m just being dense, but I am having some trouble.  I am building a site for an academic program that has several campuses.  I have a template and weblog for ‘locations’.  For each location we wan to list a few topics. 

Location 1
-intro
-distinctives
-cost
-apply
Location 2
-intro
-distinctives
-cost
-apply
Location 3
-intro
-distinctives
-cost
-apply

I want the page to list the 3 main topics on the left as subnav. 

{exp:structure:nav_sub start_from="/locations/" show_depth="0" css_class="topnav" current_class="currentSection"}

That works.  I see the list of locations just fine. 

However when I click on one it just adds the ‘currentSection’ class and changes the link color.  If I use this:

{if segment_2 == ""}
{exp
:structure:nav_sub start_from="{segment_1}" show_depth="0" css_class="topnav" current_class="currentSection"}
{if
:else}
{exp
:structure:nav_sub start_from="{segment_2}" show_depth="0" css_class="topnav" current_class="currentSection"}
{
/if}

The list of locations shows, but when I click on one of them I get a blank space with nothing.


Also, does it mater if I have the same titles for each location’s children?  IE each one has a intro, distinctives, cost, apply link.  Is there a better way to do this?

Profile
 
 
Posted: 22 January 2010 03:48 PM   [ Ignore ]   [ # 1123 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  503
Joined  07-16-2005

@Doug E Have you tried leaving show_depth out and letting it default to the normal behavior?

 Signature 

Travis Schmeisser // rockthenroll


Structure: a new way to build ExpressionEngine sites

Profile
 
 
Posted: 23 January 2010 05:20 AM   [ Ignore ]   [ # 1124 ]  
Grad Student
Rank
Total Posts:  85
Joined  03-03-2009

another issue, not neccessarily structure, but how to style its output.  I have a left side sub nav.  Some have one level of nav, others two.  It works fine,  but the CSS stying is being a real pain.  The tag in the template is:

{

exp:structure:nav_sub start_from="/{segment_1}" show_depth="2" css_id="none" show_level_classes="no" current_class="currentSection"}

That outputs:

<div id="sideNav" class="grid_3">
    <
h1>About</h1>
    <
ul><li class="currentSection"><a href='/index.php/about/overview/'>Overview</a>
<
ul>
<
li><a href='/index.php/about/overview/what/'>What </a></li>
<
li><a href='/index.php/about/overview/difference/'>Difference</a></li>
<
li><a href='/index.php/about/overview/founding/'>Founding</a></li>
<
li><a href='/index.php/about/overview/college-credit/'>College Credit</a></li>
<
li class="last"><a href='/index.php/about/overview/faq/'>FAQ</a></li>
</
ul>
</
li>
<
li class="currentSection"><a href='/index.php/about/curriculum/'>Curriculum</a>
<
ul>
<
li><a href='/index.php/about/curriculum/overview/'>Overview</a></li>
<
li><a href='/index.php/about/curriculum/module-1/'>Module 1</a></li>
<
li><a href='/index.php/about/curriculum/module-2/'>Module 2</a></li>
<
li><a href='/index.php/about/curriculum/module-3/'>Module 3</a></li>
<
li class="last"><a href='/index.php/about/curriculum/module-4/'>Module 4</a></li>
</
ul>
</
li>
<
li><a href='/index.php/about/teaching-method/'>Teaching Method</a></li>
<
li><a href='/index.php/about/practicum/'>Practicum</a></li>
<
li class="last"><a href='/index.php/about/spiritual-growth/'>Spiritual Growth</a></li>
</
ul>

    </
div>

The CSS is:

#sideNav ul {
    
margin-top: 15px;
}

#sideNav li {
    
background-image: url(../images/interface/sideNavDivider.jpg);
    
background-repeat: no-repeat;
    
display: block;
    
padding-top: 9px;
    
padding-bottom: 9px;
}

#sideNav li a {
    
font-size: 14px;
    
text-decoration: none;
    
font-weight: normal;
    
color: #005a9c;
    
padding-left: 20px;
}

#sideNav li a:hover {
    
color: #8dc63f;
}

#sideNav li .currentSection {
    
background-image: url(../images/interface/sideNavPointer.png);
    
background-repeat: no-repeat;
    
color: #8dc63f;
    
background-position: 0px 0px;
}


/* sideNav Second Level Nav */
#sideNav ul ul{
    
margin: 0px;
    
padding: 0px;
}

#sideNav ul ul li{
    
background-image: none;
    
padding-top: 2px;
    
padding-bottom: 2px;
}

#sideNav ul ul li a {
    
font-size: 12px;
    
text-decoration: none;
    
font-weight: normal;
    
color: #005a9c;
    
padding-left: 40px;
}

#sideNav ul ul li a:hover {
    
color: #8dc63f;
}

#sideNav ul ul li .currentSection {
    
background-image: url(../images/interface/sideNavSubPointer.png);
    
background-repeat: no-repeat;
    
color: #8dc63f;
    
background-position: 20px 0px;
}

The parent nav items should have a large arrow to the left, The child nav items should have a smaller arrow to the left.  Both should change color when selected.  The big arrow does show up when I select a child entry, but not the parent.  No arrow shows up when a parent entry is selected.  In both child and parent entries, they do not change color when selected. 

I’ve looked over turorials, stared at my code, played around with it (I can get the smal and bigl arrow to show up and the color to change when a child entry is selected if I do this:

#sideNav ul li .currentSection a{
  background-image: url(../images/interface/sideNavSubPointer.png);
  background-repeat: no-repeat;
  color: #8dc63f;
  background-position: 20px 0px;
}

Changing it to:

#sideNav ul li .currentSection a{
  background-image: url(../images/interface/sideNavSubPointer.png);
  background-repeat: no-repeat;
  color: #8dc63f;
  background-position: 20px 0px;
}

yeilds a big arrow next to child entries (no color change in the link text as there should be).

I played around with adding the nav-level-1 and 0 classes, but no joy.  Sighhhh, just not my day.  Any ideas?

Profile
 
 
Posted: 23 January 2010 10:33 AM   [ Ignore ]   [ # 1125 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  503
Joined  07-16-2005

Doug - it looks like you have “li .currentSection” when you actually need li.currentSection because the class is ON the li

 Signature 

Travis Schmeisser // rockthenroll


Structure: a new way to build ExpressionEngine sites

Profile
 
 
Posted: 27 January 2010 07:04 PM   [ Ignore ]   [ # 1126 ]  
Grad Student
Avatar
Rank
Total Posts:  76
Joined  07-30-2009

I am using structure 1.3 and have problems getting the {exp:weblog:prev_entry} tag to work in the same “order” as the “structure” order.

If I create a new page with structure and change the order the {exp:weblog:prev_entry} tag would not be synced because it sorts using the entry_id.

Example: page A, page B, page C are existing pages in structure. I add page D and place it on the first position. D A B C.

If I view page D the {exp:weblog:prev_entry} tag would give me only the prev link because its sorts it after entry_id. But it should show me the next link instead.

What would be the way to go to make structure play nicely with the {exp:weblog:prev_entry}? Changing the entry_id manually?

Profile
 
 
Posted: 28 January 2010 10:15 AM   [ Ignore ]   [ # 1127 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  503
Joined  07-16-2005

@Interfacer That tag does not work with our pagination currently as our pagination is somewhat custom. We have plans for rev + next soon, but it would require an upgrade to 2.0.

 Signature 

Travis Schmeisser // rockthenroll


Structure: a new way to build ExpressionEngine sites

Profile
 
 
Posted: 28 January 2010 06:40 PM   [ Ignore ]   [ # 1128 ]  
Grad Student
Avatar
Rank
Total Posts:  76
Joined  07-30-2009

Thanks Travis,
Is there a work around though. If I just change the entry id in EE so that the page D would be the first one? Not the prettiest idea but would work wouldn’t it.

Profile
 
 
Posted: 28 January 2010 08:31 PM   [ Ignore ]   [ # 1129 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  503
Joined  07-16-2005

@Interfacer I haven’t tested, but I don’t think that tag would register. If you think it might work, try it out until we can implement.

 Signature 

Travis Schmeisser // rockthenroll


Structure: a new way to build ExpressionEngine sites

Profile
 
 
Posted: 22 February 2010 07:50 PM   [ Ignore ]   [ # 1130 ]  
Grad Student
Avatar
Rank
Total Posts:  43
Joined  11-24-2008

Hi,

Having an error issue with structure.  Everything was going fine and now all of a sudden i am getting this error whenever i try to add a page.

“You are not authorized to post in this section”

The only thing i changed was i added a couple of custom fields to the section that most of structure is using.  But i posted some pages after adding them without difficulty.  Now i only have 1 page on the structure tab that it will let me add pages below without getting the error.

Odd thing is i can use the publish tab and then manually add the structure info of parent etc from the structure tab on the publish page and that works fine.

Has anyone else had this error or problem.  I saw a bit in the thread but it was very old and didn’t seem related.  I even went to the trouble of checking and resaving each entry.

Profile
 
 
Posted: 22 February 2010 09:15 PM   [ Ignore ]   [ # 1131 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  503
Joined  07-16-2005

@PhilBrienesse Is it a super admin account? If not, are you sure it has access to that weblog? Can you try adding another login and doing it through another user to see if that works?

 Signature 

Travis Schmeisser // rockthenroll


Structure: a new way to build ExpressionEngine sites

Profile
 
 
Posted: 22 February 2010 09:31 PM   [ Ignore ]   [ # 1132 ]  
Grad Student
Avatar
Rank
Total Posts:  43
Joined  11-24-2008

Yes it is a superadmin and just for kicks i created another member group to see if that was the issue and still no go.  As i mentioned i can post to this section using the regular publish tab.

Profile
 
 
Posted: 22 February 2010 09:34 PM   [ Ignore ]   [ # 1133 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  503
Joined  07-16-2005

Was this install moved from anywhere? Has anything in the DB been changed? It’s odd that it just stopped working, something had to have changed. Does removingg the new custom fields allow you to post?

 Signature 

Travis Schmeisser // rockthenroll


Structure: a new way to build ExpressionEngine sites

Profile
 
 
Posted: 22 February 2010 09:43 PM   [ Ignore ]   [ # 1134 ]  
Grad Student
Avatar
Rank
Total Posts:  43
Joined  11-24-2008

Also just created another weblog and tried switching one of the problem pages to that and also did not work.  Tried creating another top level page and i can add new sub level pages to that but if i move any of the current sub level pages into that top level I still get the same error from them.

Profile
 
 
   
63 of 64
63
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120534 Total Logged-in Users: 72
Total Topics: 126597 Total Anonymous Users: 45
Total Replies: 665548 Total Guests: 370
Total Posts: 792145    
Members ( View Memberlist )
Newest Members:  suntroprachel123Rach123Glenn StavaImfaelSMS!persanulandrewknightKittx77Amity