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

3six3's avatar
3six3
28 posts
16 years ago
3six3's avatar 3six3

I’ve moved this online so you can see what’s happening http://joomlatry.com/index.php/about/

clicking on the home tab works but any other tab does not… ????

frustrating.

       
dix-eaton's avatar
dix-eaton
5 posts
16 years ago
dix-eaton's avatar dix-eaton

Sorry if this has been talked about, this thread is quite large. If I’m an idiot and it is somewhere obvious and I am missing it, I apologize in advance.

Is there a way to list every parent’s children to create, say, a sitemap, for example?

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.
I’ve moved this online so you can see what’s happening http://joomlatry.com/index.php/about/ clicking on the home tab works but any other tab does not… ???? frustrating.

3six3 - I recently moved hosts and ran into this issue during the transition. I didn’t have a dedicated IP address, so my URL was in a home directory somewhat like yours: www.url.com/~mysite

The Structure module currently seems to make the assumption that you’re operating at root level, and if you’re not it breaks completely like you said. It would be nice if that was changed down the road. My solution was to get a dedicated IP and that fixed everything. If this is your dev box you will probably either need to change how you’re serving your pages (use virtual hosts, or I just modify http.conf and restart apache to switch projects I’m working on).

EDIT: Yikes. I guess I didn’t read the url of your last post. When I moved my site from my dev box to the live server I had some weird issues and had to basically reinstall the module and start from scratch (you don’t lose your posts, just the structure data). Since you’ve got your local copy, you might test doing that with just 1 page or 2 to see if that does anything.

       
3six3's avatar
3six3
28 posts
16 years ago
3six3's avatar 3six3

Thanks Brian

This demo I have up at http://www.joomlatry.com/ is a fresh install of expression engine with only the templates from the tutorial which is here http://jambor-ee.com/tutorials/structure

The server I’m running on is a media temple dedicated virtual (which has cause some weird things in the past) so i’ve also loaded this on a hostgator server and the same thing happens.

I’m running out of hair to pull out :-(

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
16 years ago
Matt Weinberg's avatar Matt Weinberg
Is there a way to list every parent’s children to create, say, a sitemap, for example?

Not at this time. I, and some others in the thread, have used MySQL queries/PHP to query the Structure table and make our own sitemap from it.

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.
Thanks Brian This demo I have up at http://www.joomlatry.com/ is a fresh install of expression engine with only the templates from the tutorial which is here http://jambor-ee.com/tutorials/structure The server I’m running on is a media temple dedicated virtual (which has cause some weird things in the past) so i’ve also loaded this on a hostgator server and the same thing happens. I’m running out of hair to pull out :-(

Sorry 3six3. Hopefully rockthenroll is back from SXSW and can help you soon.

       
Martin Luff's avatar
Martin Luff
52 posts
16 years ago
Martin Luff's avatar Martin Luff

@3six3 hello there. Looks like you fixed your site (I visited the URL you gave before and it looks OK now)? Or is this a temp hand-coded fix?

If you’re still having problems then I wanted to check if you using the navigation as set out in the tutorial template from Travis at TrainEE which I believe is a hard-coded example? If so, then you can try taking the example code and replace this with the dynamic tag; so for example remove:

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

and replace with something like:

{exp:structure:nav_main}

Just thought it was worth a try in case that was causing your problem…

Regards

Martin

       
Martin Luff's avatar
Martin Luff
52 posts
16 years ago
Martin Luff's avatar Martin Luff

@shartie

I believe Travis has indicated that improved navigation and site-map type functionality is planned for the next version… (I’d certainly be very pleased to see that - IMHO would really make a great addition - although I understand the way that the navigation is currently being processed wouldn’t make that possible in the existing tag). Given that the Structure control panel essentially already produces such a map then I wouldn’t imagine it wouldn’t be overly difficult to add a tag so this could be displayed in weblog pages as well. Here’s hoping… 😉

Regards

Martin

       
3six3's avatar
3six3
28 posts
16 years ago
3six3's avatar 3six3

Hey thanks Martin.

I hard coded the main nav for now. My thought was my client will not want to edit the main menu but will want to edit the subs.

I’ll give that a try now 😊

       
3six3's avatar
3six3
28 posts
16 years ago
3six3's avatar 3six3

Thank you sooooo much. Couldn’t see the forest for the trees.

Still learning this ee… Thanks for all the help guys. If you’re ever in Vancouver….. 😊

       
Martin Luff's avatar
Martin Luff
52 posts
16 years ago
Martin Luff's avatar Martin Luff

@3six3 you’re very welcome; I’m glad the advice was helpful. Didn’t want to see poor Kitty with any less hair 😉

There’s also a parameter if you ever need to exclude any of the Structure site sections from the main nav (see the docs).

All the best

Martin

       
pippindesign's avatar
pippindesign
1 posts
16 years ago
pippindesign's avatar pippindesign

Hello,

I have set up Structure and am extremely satisfied with its functionality. However, in trying to set up individual category listing pages, I have found the pagination tag to incorrectly display the number of pages. While the weblog tag outputs the correct number of entries with category=“X”, the pagination tag outputs the number of pages there would be without a category defined.

For example, the weblog “job-listings” has 300 entries, which = approx. 30 pages with limit=“10”. The category “USA” has only 4 listings, which display correctly using category=“1” However, the pagination on the USA category page yields “Page 1 of 30” and has NEXT links to 29 blank pages.

I am not sure if I have set up something incorrectly, am trying something the pagination function cannot handle, or if I have uncovered a bug.

Any help would be appreciated.

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

Once again, I apologize for the delay. Work and traveling have kept me slammed. I’ll try to answer or get support started for the threads I’ve missed. If you feel I don’t address your item please PM me your issue instead of reposting here.

Also, regarding module compatibility and problems. Let’s try to keep relevant items within this thread and other things elsewhere. For example, let’s keep the LG htaccess generator discussion in a seperate thread, as it’s not necessarily related to this one. You’re welcome to PM me a link if you ever have another thread you’re afraid I’ve missed.

Thanks everybody! I appreciate all the help and positivity even though I’m very behind.

Ok…HERE WE GO…

@vik407 Good call on the warning before changing the weblog type. On the list!

@Brian M. We will continue developing this for 2.0 so you can use it with no worries! We use it ourselves, so it’s pretty high on the list to work through when 2.0 comes. Right now, there’s no way to generate conditional nav_sub items, very good idea though - adding to our list!

@dj-rowan check your PMs

@agun thanks for the heads up we’ll review for the next reelase. Haven’t run into this issue, so not sure what’s up.

@Brian M. + @IschaGast reordering is definitely a problem without the correct PHP version. I hate to cut people off, but we don’t have plans to alter how that works. Preperation for EE 2.0 will most likely be a complete rewrite and become Structure 2.0, so that may change. May, being the key word.

@Tyssen we’re working on alternate nav_sub tags for the next release

@rayofspearia We’ve never run into that issue, even with a site that previously used the Pages module. Check your PMs.

@Brian M. thanks for the bug find on the children/status issue

@3six3 the module should read your install settings and not assume you’re in the root any more. Do you hav the latest version (1.1.1)? Check your PMs.

@pippindesign we may not have categories implemented correctly within pagination. We usually limit things b a custom field so it’s on one tab for the client. Can you change it to use a custom field instead, just so you have something working? We can look into it for the next version, but that may be a while and I know everyone has deadlines. PM me if that’s not a solution and we’ll see if we can help.

       
Andrew Gunstone's avatar
Andrew Gunstone
101 posts
16 years ago
Andrew Gunstone's avatar Andrew Gunstone

Hi all… another question! I have Structure set up beautifully… it really does work a treat. This question is about using the breadcrumbs tag, and “non-static” pages.

I have two weblogs: Static and News

The Static weblog is managed by Structure, but the News one is not.

I have the breadcrumbs tag working beautifully for my Static weblog (i.e. pages such as About us, Contact, etc).

Okay… so to my actual question… the breadcrumbs works great on the main News page (http://www.mydomain.com/news/) where I list all news items…but this is a page in my Static weblog. When I click on a news entry (http://www.mydomain.com/news/comment/this_is_the_news_title), the breadcrumbs tag doesn’t work (it shows nothing at all). Obviously what I was hoping for was something like :

home > news > this is the news title

I tried setting the News weblog as an Asset, but this didn’t seem to do anything at all (I don’t think I really get Assets… what is the difference between an Asset and Unmanaged??). The only way I can think to get this working is to turn my News weblog into one that is managed by Structure, but won’t this list ALL the news items in the Structure module tab? That could be hundreds of entries…

Has anyone run into this issue? Should I hardcode the breadcrumbs into my News comment page? Thoughts?

Cheers.

       
Andrew Gunstone's avatar
Andrew Gunstone
101 posts
16 years ago
Andrew Gunstone's avatar Andrew Gunstone

Okay… I am going to answer my own question. No, you can’t get the “breadcrumbs” tag working on a non-structure driven weblog page (i.e. using a normal EE url structure to show a weblog entry - http://domain/template_group/template/url_title).

Unfortunately most of my sites use a combination of the Structure module (for static pages), and the normal EE functionality (for news, calendar, etc weblogs).

So what I have done is made some changes to the “breadcrumb” function in the “mod.structure.php” file (apologies to @rockthenroll if I am overstepping the mark by changing this).

I am not going to go into line by line what I have changed… I have attached the new function as a file, because it was too long for a single post.

So what does this do… well… the {exp:structure:breadcrumb} tag works as described on the nGen page for all pages generated via the Structure module. What I have added is when you go to a non-Structure driven URL, the script will now work its way back through the URL to find a Structure URL. Confused yet?

Imagine that we have a static “News” page that simply lists all my news items. This page has a structure URL of “/news/” so our full URL would be “http://www.mydomain.com/news/”. Then we have a bunch of “news” entries in weblog that is not managed by the Structure module. These pages use a normal EE URL (i.e. http://domain/template_group/template/url_title) - so an example would be http://www.mydomain.com/news/comment/news_item_url_title/

The script would now look at /news/comment/news_item_url_title/ determine that it is NOT a Structure URL, then try /news/comment/ (still not a Structure URL), then try /news/ - FINALLY we have found a Structure URL… we can now start to output our breadcrumbs!!

Home > News

But what we want is to add in the title of the current page as the “here” part of the breadcrumbs. I have added a new attribute called “here_url_title” that simply appends that text to the end of breadcrumbs. So using:

{exp:structure:breadcrumb here_as_title="yes" here_url_title="My news item title!"}

Would output:

Home > News > My news item title!

Obviously you could do this for real with:

{exp:weblog:entries weblog="news"}
{exp:structure:breadcrumb here_as_title="yes" here_url_title="{title}"}
{/exp:weblog:entries}

Hopefully someone will find this useful!

Cheers.

       
First 28 29 30 31 32 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.