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

ipixel (Australia)'s avatar
ipixel (Australia)
158 posts
15 years ago
ipixel (Australia)'s avatar ipixel (Australia)

Certainly for organisation you could break the templates down into groups. Myself where there has been different ‘weblogs’ (content types) published into the hierarchy, the majority of templates just site in a single template group, then in the Structure settings, I set the default template to be used for each weblog. For alternatives, you can store them where you like, and then set them in the entry’s Structure tab.

Be sure to break out the common elements on each page such as htmlhead, header, nav, side nav and footer out as embeds so you can adjust across the site where required and use embed variables where needed to parse specific entry and weblog information to the embeds…if that makes sense.

This site here uses multiple weblogs as ‘content types’, and the majority of those specific content type templates are in a single template group.

http://www.iipc.com.au/

IIRC, the weblogs are Site Content (for static/standard page content), Staff Profile, News, Product, Case Study and Miscellaneous Content (for pieces such as footer and other common page content items etc). The main navigation items are fixed (so client can’t inadvertently add to them), but the drop downs are being produced using structure, as are the side menus.

Cheers Brendan

       
flojnel's avatar
flojnel
17 posts
15 years ago
flojnel's avatar flojnel

Thanks Brendan. Keeping them all in one group would be what would make sense to me most of the time, but I’m thinking it might be easier to separate them just for some visual organization since this site is getting pretty large.

I might change my mind, though, after I map it out more thoroughly. Just wanted to make sure that either way would work.

Very happy to find this module - think it would have been hard to pull off otherwise.

Flo

       
flojnel's avatar
flojnel
17 posts
15 years ago
flojnel's avatar flojnel

BTW, very nice site.

       
Interfacer's avatar
Interfacer
92 posts
15 years ago
Interfacer's avatar Interfacer

Hi Travis

I am usually not having any trouble getting structure to work, but this time its a bit troublesome. I have just moved my local install on server. and by browsing through the article the url behaves funny. it keeps on adding segments on single entry level eg example/category1/article1 becomes by clicking in article2 –> example/category/article1/example/category1/article2.

Could it be .htaccess problem (just call for php 5 in there though)

I am still running the good old version 1.3 on ee 1.6.8

Thanks for looking into that.

       
flojnel's avatar
flojnel
17 posts
15 years ago
flojnel's avatar flojnel

I have the Structure tutorial files installed, but there’s something I don’t understand about the submenu. Under “About Us”, I created 3 submenu items and one of those items has 2 subsubmenus.

I thought the default for {exp:structure:nav_sub} was to show all levels at once, but I only see the submenu items on the About Us page and then only the subsubmenus on a submenu page. I really don’t want to lose the submenu items on the subsubmenu pages. Is there a way to do this?

See http://homeovista.ehclients.com/about/

One other menu question - is it possible to have breadcrumbs show the title of the current page rather than “here”?

Flo

       
flojnel's avatar
flojnel
17 posts
15 years ago
flojnel's avatar flojnel

Found the answer to my question above about subnavigation. Going looking for the breadcrumbs issue again, but haven’t found it yet.

Flo

       
flojnel's avatar
flojnel
17 posts
15 years ago
flojnel's avatar flojnel

Found breadcrumb solution too - was a little obvious 😉. Finally catching on a bit.

Flo

       
Andy_vdG's avatar
Andy_vdG
62 posts
15 years ago
Andy_vdG's avatar Andy_vdG

Hi - great Module! Working nicely except for my blog entries. I’ve got weblog=blog set up with listing checked and template is blog/index. My entries then use blog/entry as their template. When I display a single entry the titletrail tag as well as the nav_full parameters don’t work. The title just displays my site-name and nowhere in the navigation is the class=here set. Am I missing something?

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

@Andy_vdG Are you using page_url or page_uri? If you’re switching to url_title that could be the issue.

       
Andy_vdG's avatar
Andy_vdG
62 posts
15 years ago
Andy_vdG's avatar Andy_vdG

Ok that fixed the title trail and the navigation on one section of the site. I guess you need to use page_url or page_uri instead of title_permalink. Still having trouble with the blog. Will post a link once the site is online.

       
Andy_vdG's avatar
Andy_vdG
62 posts
15 years ago
Andy_vdG's avatar Andy_vdG

So the site is online at http://www.alpentrekking.ch If you click on blog and then on any of the entries you’ll see that the title works but the navigation doesn’t highlight blog anymore. However if you go to blog - stories and click on any of the entries there it sets the parent-here class and highlights blog in the naviation.

Also - does Structure require that the index.php be removed? It was working fine without index.php on my dev server but when moving to the live server it didn’t like the .htaccess file so I set everything back to using index.php?/. However now I am having problems with pagination. It basically just links to index.php?page2 which brings up my 404 page. (http://www.alpentrekking.ch/index.php?/blog/) Here’s my template code

{exp:structure:paginate parse="inward" location="both" mode="sliding" show_num_pages="2" first="« Anfang" last="Ende »" next="Weiter »" previous="« Zurück"}
                {exp:weblog:entries weblog="blog" dynamic="off" limit="5" disable='categories|category_fields|member_data|trackbacks'}{if no_results}{redirect='404'}{/if} 
                    <div class="entry">
                        <h2><a href="http://{page_url}">{title}</a></h2>
                        {if blog_summary}{blog_summary}...{if:else}{blog_content}{/if}
                        
                            <a href="http://{page_url}class=readmore">Mehr...</a> | 
                            <a href="http://{page_url}#commentsclass=comments">Kommentare ({comment_total})</a> |
                            <span class="date">{entry_date format="%d.%m.%Y"}</span>
                        
                    </div>
                    <hr>
                {/exp:weblog:entries}
                {/exp:structure:paginate}

Am I missing something?

       
Andy_vdG's avatar
Andy_vdG
62 posts
15 years ago
Andy_vdG's avatar Andy_vdG

My ISP got .htaccess rewrite working so pagination works again :-D I still have one major problem though. The Structure path strips out any “.” in the entries URL title. This basically breaks my exp:weblog:prev_entry & exp:weblog:next_entry tags as they don’t work with {page_url}

{exp:weblog:prev_entry weblog="blog"}
            <strong>« Älter:</strong> <a href="http://{path=blog}">{title}</a>
            {/exp:weblog:prev_entry}
            </div>
            {exp:weblog:next_entry weblog="blog"}
            <strong>Neuer:</strong> <a href="http://{path=blog}">{title}</a> <strong>»</strong>
            {/exp:weblog:next_entry}

As I’ve migrated this site over to structure I would say almost half the entries contain some sort of date. Let’s take http://www.alpentrekking.ch/blog/14909-susten-goms-geschinen-img_0797/ This links fine from any structure page using {page_url}. However I now click on the previous or next entries at the top of the page and it doesn’t work. This is because the URL for these entries are saved with the date intact e.g. 15.9.09-geschinen-airolo-img_0843 but Structure is expecting 15909-geschinen-airolo-img_0843. Now even though I do think those titles need to be cleaned up anyway it will be a lot more work having to go into the structure tab separately for each entry instead of using the edit all selected functionality.

Is there a reason the Structure path behaves differently than the EE URL title? Wouldn’t it be easier to keep them the same? (I have no clue about the inner workings of structure so there might be a really good reason)

       
johanbaaij's avatar
johanbaaij
2 posts
15 years ago
johanbaaij's avatar johanbaaij

Using structure 1.3.0 Would really like to have a menu that shows the whole Structure structure with nested UL’s and some css classes.

I guess this is what nav_full does in 2. The sitemap is a start but it doesn’t have CSS classes. Am I correct this is not so easy with the 1.3.0 version?

Thanks!

edit: seems like i should check out Structure Entries… http://ellislab.com/forums/viewthread/142988/

looking into that as we speak!

       
Bransin's avatar
Bransin
157 posts
15 years ago
Bransin's avatar Bransin

Great module, but things I’m still weary of and things I’d like to see.

Expand and contract accordion structure of pages and sub pages in the module admin panel. This can get quite lengthy with over 200 pages.

       
illustrationdan's avatar
illustrationdan
26 posts
15 years ago
illustrationdan's avatar illustrationdan

I have structure installed, latest version, latest build and for some reason the when I add new pages it doesnt load them, in debugging it says(page is called “another”

(0.000030) - Begin Template Processing -
(0.003632) URI: /another/
(0.003649) Path.php Template: /
(0.003672) Retrieving Template
(0.003689) Parsing Template URI
(0.018943) Showing index. Template not found: another
(0.018983) Retrieving Template from Database: site/index
(0.022396) Template Found

It just loads the homepage, except the title tag shows the title of the page, it wont load the page, it just loads the homepage. When i set strict url’s i get a 404 page.

Anyone have this happen?

Update: This is an issue with the latest 1.6.9 build.

Thanks for the responses

       
First 76 77 78 79

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.