A couple more quick bugs (at least I think they’re bugs 😊
Overview Quick Start (Click Here, highlights as current) - Training (but this one highlights as well) - Implementation (so does this one) Product Delivery Blog
Overview Quick Start (Click Here, everything below this section disappears) - Training - Implementation (What happened to Product Delivery and Blog?)
P.S. This is a really sweet module; I’m just in production mode trying to roll out a site for a client and these are kind of show stoppers. Trying to figure out if I need to go a different direction or if these sub_nav bugs will get fixed soon.
I uploaded the latest version of Structure (1.3.0) to an EE 1.3.7 site. It doesn’t allow me to specify slashes (e.g. /about/contact); it truncates the slash and leaves it as “aboutcontact”.
I’m sure I have a version mis-match, but I’ve re-uploaded all of the files twice. Any ideas?
1. If you go to a page with sub-level pages in sub-navigation, all of them highlight as current. Example: Overview Quick Start (Click Here, highlights as current) - Training (but this one highlights as well) - Implementation (so does this one) Product Delivery Blog
Hi Jonathan,
Are you sure that Structure is applying a ‘here’ class to the sub-level pages? Take a look with Firebug. I had the same issue but it was caused by the child <li> element inheriting it’s style from the parent <li>. It’s easily resolved with the following css:
// The first level of sub nav
.secondary-navigation li.here a {
color: #666;
font-weight: bold;
}
// This is the second level of sub nav
.secondary-navigation li.here li a {
color: #333;
font-weight: normal;
}
Hope this helps? 😊
Gary
I uploaded the latest version of Structure (1.3.0) to an EE 1.3.7 site. It doesn’t allow me to specify slashes (e.g. /about/contact); it truncates the slash and leaves it as “aboutcontact”. I’m sure I have a version mis-match, but I’ve re-uploaded all of the files twice. Any ideas?
The Structure field “Page URL” and the EE field “URL Title” cannot have slashes. The only place appropriate for a path with slashes that I can think of would be the Structure field “Parent” or “Template”. This is a popup list.
So, if you want your new page called “contact” to have a path of “about/contact”, put “contact” into the URL Title field, and select “About” in the parent field.
@Ambition Great suggestion. Adding to my list of considerations. Thanks for your time!
@fortys We’re hoping to have a bug release out this week for that.
@Mikec964 Unique IDs for each element are on the way in the next major release
@openmotive Good points and exactly why I’m apprehensive about this feature or how it’s implemented. Food for thought, but if it is added it will be clear so that there’s not confusion as to what each does for the user. The tree-view and ethos of Structure is making content management easy and it will always stay that way.
@fortys That definitely shoudln’t happen on that page. We’ll look into it. Check your PMs. Def make sure it’s not a style issue first like @Ambition said. RE: title - maybe use conditionals to not display that tag when segment_2 == “”
@creativearc Structure is unsupported (and untested, but it may work) with that old of a version. Also, you can’t specify “/” as it builds the parent relationships for you. You’d need to add an “about” page and than a “contact’ page under that. Posting to the forum as well.
Ok, i had major troubles with the output of nav_sub, and while trying fix the bug if exidently stumbled upon a full working navigation.
I’ve added the follwoing tag:
{exp:structure:nav_full exclude_status="xxx" css_id="nav"}
Most of the nav_sub options work, except, start from.
What i did: - I removed a cleanup foreach-loop that normally removed the unnecessary posts from the array. - Changed the class parent-here to here - Added a <span> to every <a>
Some CSS to make a easy, robust navigation:
/********************************************************************************************************/
/*********************************************[ Supernav ]***********************************************/
/********************************************************************************************************/
.navigation .wrapper { border-top:1px solid #2d444f; border-bottom:1px solid #2d444f; background:url(../img/nav1_bg.gif) repeat-x 0 100% #666e73; }
#nav{height: 27px;padding:0 30px; }
/************** ALL LEVELS *************/ /* Style consistent throughout all nav levels */
#nav li { position:relative; text-align:left; }
#nav li.over { z-index:99; }
#nav li.here { z-index:100; } /* to prevent the li separator from showing through on mouseover on li */
#nav a,
#nav a:hover { display:block; text-decoration:none; }
#nav span { display:block; /*cursor:pointer;*/ }
#nav a { line-height:1.3em; }
/************ 1ST LEVEL ***************/
#nav li { float:left; background:url(../img/nav1_sep.gif) no-repeat 100% 0; }
#nav li.here { margin-left:-1px; background:url(../img/nav1_active.gif) no-repeat; color:#fff; font-weight:bold; }
#nav li.here em { display:block; position:absolute; top:0; right:-1px; width:3px; height:27px; background:url(../img/nav1_active.gif) no-repeat 100% 0; }
#nav a { float:left; padding:0 14px; color:#fff; line-height:27px; }
#nav li.over a { color:#d6e2e5; }
/************ 1ST LEVEL RESET ************/
#nav ul li,
#nav ul li.here { float:none; height:auto; background:none; margin:0; }
#nav ul a,
#nav ul a:hover { float:none; padding:0; line-height:1.3em; }
#nav ul li.over a,
#nav ul li.over a:hover,
#nav ul a,
#nav li.here li { font-weight:normal; }
/************ 2ND LEVEL ************/
#nav ul { position:absolute; width:189px; top:27px; left:-10000px; padding-bottom:3px; border-top:1px solid #2d444f; }
#nav ul ul { border-top:0; background:url(../img/nav3_bg.png) 0 0 no-repeat; padding-top:2px; left:100px; top:13px; }
/* Show menu */
#nav li.over ul { left:-1px; }
#nav li.over ul ul { left:-10000px; }
#nav li.over ul li.over ul { left:100px; }
#nav ul li { background:url(../img/nav2_li_bg.png) repeat-y; padding:0 2px; }
#nav ul li.here{background:url(../img/nav2_li_bg.png) repeat-y; padding:0 2px;}
#nav ul li a { background:#e3ecee; }
#nav ul li a:hover { background:#d0dfe2; }
#nav li.over ul a,
#nav ul li.here a,
#nav ul li a,
#nav ul li a:hover { color:#2f2f2f; }
#nav ul span,
#nav ul li.last li span { padding:5px 15px; background:url(../img/nav2_link_bg.gif) repeat-x 0 100%; }
#nav ul li.last span,
#nav ul li.last li.last span { background:none; }
#nav ul li.last { background:url(../img/nav2_last_li_bg.png) no-repeat 0 100%; padding-bottom:3px; }
#nav ul li.parent a,
#nav ul li.parent li.parent a { background-image:url(../img/nav2_parent_arrow.gif); background-position:100% 100%; background-repeat:no-repeat; }
#nav ul li.parent li a,
#nav ul li.parent li.parent li a { background-image:none; }
/************ 3RD+ LEVEL ************/
/* Cursors */
#nav li.parent a,
#nav li.parent li.parent a,
#nav li.parent li.parent li.parent a { cursor:default; }
#nav li.parent li a,
#nav li.parent li.parent li a,
#nav li.parent li.parent li.parent li a { cursor:pointer; }
/* Show menu */
#nav ul ul ul { left:-10000px; }
#nav li.over ul li.over ul ul { left:-10000px;}
#nav li.over ul li.over ul li.over ul { left:100px; }
jQuery is use to make it function:
$(document).ready(function() {
$("#nav li").hover(
function () {//over
$(this).addClass('over');
},
function () {//out
$(this).removeClass('over');
}
);
$('#nav li:has(ul)').addClass('parent');
});
Would appreciate if anyone can shed some light on what to do here…
I installed EE 1.6.8 locally, with Structure 1.3.0 and on MySQL 5. When I moved to the live server which has MySQL 4 I get this error when I try to add or update a Structure entry:
MySQL ERROR: Error Number: 1064 Description: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘DIV 2) AS numChildren FROM exp_structure AS node INNER JO Query: SELECT node.*, (COUNT(parent.lft) - 2) AS depth, if((node.rgt - node.lft) = 1,1,0) AS isLeaf, ((node.rgt - node.lft - 1) DIV 2) AS numChildren FROM exp_structure AS node INNER JOIN exp_structure AS parent ON node.lft BETWEEN parent.lft AND parent.rgt WHERE node.entry_id = ‘12’ GROUP BY node.lft LIMIT 1
Seems like a problem with the version of MySQL, is that right? I tried uninstalling Structure and reinstalling but got the same error.
@Ambition, sorry I didn’t respond, apparently I’m not getting notifications for sometimes when new stuff is posted here. I think you’re right. I always use my a element to add classes so I had to change everything in my css when I realized Structure puts it on the li instead. Must have missed that one 😊
@rockthenroll the conditional seem to work pretty well; thanks!
Me again 😊. I’ve tried looking through this 50 page thread but haven’t been able to find anything about this.
So say I’ve got a blog and I’m using the listing feature to let the client add new entries. I’ve got all the templates setup and everything’s working great except when I try to use the category links. If my URL is right (ie http://site.com/blog/category/blogging/), I get sent to the homepage instead of taking all those entries on the blog page and showing me the ones in the blogging category.
I’m guessing this has something to do with the fact that there’s not a blog template per sé and it’s trying to find an actual “category” and “blogging” template somewhere and failing?
I’ve setup a blog listing page and it links fine to a blog detail page of the article, so I know those URL’s work. Not sure why these wouldn’t. Any ideas?
EDIT: Links like this don’t seem to work either: http://site.com/blog/2009/09/
@fortys you can always feed them through other templates or a completely different template group if you want, otherwise stinhambo http://hambodevelopment.com provided this awesome template with conditional code for serving up different bits of content based on the URL for categories.
{embed="_inc/_html_head" body_id="{segment_1}" title="Articles | {site_name}"}
{embed="_inc/_html_masthead"}
<div id="main">
<div id="left-column">
{!-- THIS IS MY NORMAL SOLUTION --}
{!-- {embed="_inc/_html_articles" dynamic="{if segment_2 == "category"}on{if:else}off{/if}"} --}
{!-- THIS IS THE BLOCK OF CODE CALLED _HTML_ARTICLES WHICH IS BEING CALLED ABOVE --}
{exp:weblog:entries weblog="articles" orderby="date" dynamic="on" sort="asc" limit="15"}
<div class="entry">
<h3 class="date">{entry_date format='%l, %F %d, %Y'}</h3>
<h2 class="title"><a href="http://{url_title_path=">{title}</a></h2> <!-- This says 'Use the articles_entry template to style individual entries -->
{categories}
Category: <a href="http://{path=">{category_name}</a>{!-- This says 'Use the articles template to style lists of entries --}
{/categories}
{article-summary}
<div class="posted">Posted by {author} on {entry_date format='%m/%d'} at {entry_date format='%h:%i %A'}</div>
{paginate}
<div class="paginate">
<span class="pagecount">Page {current_page} of {total_pages} pages</span> {pagination_links}
</div>
{/paginate}
</div>
{/exp:weblog:entries}
</div> <!-- left-column -->
<div id="right-column">
{embed="_inc/_html_sidebar"}
</div> <!-- right-column -->
</div> <!-- main -->
<div class="clear"></div> <!-- clear -->
</div> <!-- container -->
{embed="_inc/_html_footer"}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.