We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New Module: Structure - Uses entries to create a page hierarchy for static and listing pages

Development and Programming

rockthenroll's avatar
rockthenroll
485 posts
15 years ago
rockthenroll's avatar rockthenroll

@Interfacer If you feed something through the normal templating system you can still do that, but no built-in page-to-page nave for listings. I’d like to do this down the road though.

       
mafrozzu's avatar
mafrozzu
9 posts
15 years ago
mafrozzu's avatar mafrozzu

Hi,

I wonder if Structure can be used in developing a multilingual website.

I intend to follow the example here:

http://expressionengine.com/wiki/Multi_language_site_alternative/

and develop a site in at least two languages.

Thanks in advance.

       
rockthenroll's avatar
rockthenroll
485 posts
15 years ago
rockthenroll's avatar rockthenroll

@mafrozzu The recommended method is to have your default language at the top level and make separate branches for your alternate languages like this:

/about-us /services /es/about-us /es/services /fr/about-us /fr/services

       
mafrozzu's avatar
mafrozzu
9 posts
15 years ago
mafrozzu's avatar mafrozzu

Hello Travis,

thanks for the quick response. What you suggested is the method i’m using.

In this way i should have no problem using Structure, right?

Thanks again for your kindness,

Regards

       
rockthenroll's avatar
rockthenroll
485 posts
15 years ago
rockthenroll's avatar rockthenroll

@mafrozzu No issues, it’s what it’s built for, just adding an extra top level to divide areas. You can use exclude_status to remove those from nav_main if needed. Enjoy!

       
mafrozzu's avatar
mafrozzu
9 posts
15 years ago
mafrozzu's avatar mafrozzu

Hello Travis, thanks for the advice

I have a problem; I don’t know how to build the nav_main in different language depending the user’s choice. Any idea? Thanks

       
rockthenroll's avatar
rockthenroll
485 posts
15 years ago
rockthenroll's avatar rockthenroll

Use segment checking to show different versions of the nav_main tag. Each version of the tag can use exclude status and you can use a status for each language. Or hardcode the top level nave if it doesn’t need to be dynamic.

       
Steven Grant's avatar
Steven Grant
894 posts
15 years ago
Steven Grant's avatar Steven Grant

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">

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

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

    <div id="foot">
        Copyright © nGen Works 2008
    <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

       
rockthenroll's avatar
rockthenroll
485 posts
15 years ago
rockthenroll's avatar rockthenroll

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.

       
Steven Grant's avatar
Steven Grant
894 posts
15 years ago
Steven Grant's avatar Steven Grant

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?

       
rockthenroll's avatar
rockthenroll
485 posts
15 years ago
rockthenroll's avatar rockthenroll

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.

       
Steven Grant's avatar
Steven Grant
894 posts
15 years ago
Steven Grant's avatar Steven Grant

Thanks Travis - appreciate that.

       
Doug E's avatar
Doug E
98 posts
15 years ago
Doug E's avatar Doug E

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?

       
rockthenroll's avatar
rockthenroll
485 posts
15 years ago
rockthenroll's avatar rockthenroll

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

       
Doug E's avatar
Doug E
98 posts
15 years ago
Doug E's avatar Doug E

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>[/code]

The CSS is:
[code]#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?

       
First 73 74 75 76 77 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.