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

Plugin: Structure Entries - Add-on for Structure module

Development and Programming

Peter Lewis's avatar
Peter Lewis
280 posts
15 years ago
Peter Lewis's avatar Peter Lewis

Hi Bransin, can you make sure you’re using v1.0.8 and you’re using the {close_markup} tag pair to do the output (check the current Example 4 as it’s been changed in the past).

In the group that the closing issue is occuring in, there’s “Juice Bar” that’s appearing with parent 392 and depth 1. This clearly should be there, so is there anything odd with it inside of Structure, including going into the entry and checking the Structure tab for the parent and URL.

What version of Structure (not that it’ll make much difference), also what version of EE?

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

Saw that 1.0.9 is released.

This upgraded corrected everything. Much appreciated, thank you!

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

I don’t quite understand the use of {current_parent} and how I can use it to fix my {current_page} active state problem.

       
Peter Lewis's avatar
Peter Lewis
280 posts
15 years ago
Peter Lewis's avatar Peter Lewis

{current_parent} would make no difference to your issue, {current_parent} is for testing if the child of a parent is the current active entry (in case you wanted to highlight the menu option for example). Note this is different to {current_page}.

I’ve managed to replicate your issue on my test page and was halfway through fixing it, will hopefully finish it and upload in the next 24 hours.

       
Peter Lewis's avatar
Peter Lewis
280 posts
15 years ago
Peter Lewis's avatar Peter Lewis

v1.0.10 fixes the issue with closing markup correctly if depth restricted (it didn’t correctly close the last sibling if there were deeper children than the restricted depth).

That sounds complete gibberish!

       
Castlegate IT's avatar
Castlegate IT
25 posts
15 years ago
Castlegate IT's avatar Castlegate IT

I just upgraded today and im getting a PHP notice output when using the plugin

Warning: Call-time pass-by-reference has been deprecated in /home/tmsdi.com/htdocs/tmsdi/plugins/pi.structure_entries.php  on line 499

I’ve not had time to look into this yet myself. Anyone else having the same problem?

Edit: Using PHP 5.2.13

       
Castlegate IT's avatar
Castlegate IT
25 posts
15 years ago
Castlegate IT's avatar Castlegate IT

Ignore my last post, for whatever reason, it does not seem to be happening anymore :blank:

       
Peter Lewis's avatar
Peter Lewis
280 posts
15 years ago
Peter Lewis's avatar Peter Lewis

Hi, please see the edit on the second post of this thread, the PHP error is caused by the method I use to tap into the FieldFrame fields (which was the only way without duplicating any of the FieldFrame code).

The above mentioned post also states how to prevent the error from appearing (edit to php.ini).

I’m planning on re-writing this to avoid the issue.

       
Castlegate IT's avatar
Castlegate IT
25 posts
15 years ago
Castlegate IT's avatar Castlegate IT

Thanks for the reply, I did notice and find the offending line of code but it was commented out anyway… I’m not sure why but I’m not getting the error anymore anyway!

Just another quick question, the {title} variables being output by the plugin are not encoding characters such as “&”. I can see why this may intentional, but is there an easy way to encode them?

I could modify the code and add another parameter to the plugin tag, just wanted to check I was not missing a simpler solution.

Thanks

       
Peter Lewis's avatar
Peter Lewis
280 posts
15 years ago
Peter Lewis's avatar Peter Lewis

Can you clarify what you mean by “&” not being encoded - it works fine in my tests: http://www.northstarenergy.co.uk/test

Outputs the title “Large Scale & Commercial” fine?

       
Castlegate IT's avatar
Castlegate IT
25 posts
15 years ago
Castlegate IT's avatar Castlegate IT

Sorry perhaps I was not clear. My use of the word “encoding” was propably incorrect.

It’s outputting html entities like “&” and “£” when they should be converted to “&” and “£” so that the pages will validate. I’ve not tested but i assume it does not convert any other entities too?

       
Peter Lewis's avatar
Peter Lewis
280 posts
15 years ago
Peter Lewis's avatar Peter Lewis

LOL - “&” or “&” - that is the question! It currently outputs to html “& amp;” (without the space obviously) instead of the single character “&”. In EE, I’ve entered the title with a single character “&”.

So it is correctly encoding the characters output to your template.

This is just a standard EE output method and so is automatically parsed. Perhaps it’s something to do with your EE build or setup…?

       
Castlegate IT's avatar
Castlegate IT
25 posts
15 years ago
Castlegate IT's avatar Castlegate IT

Thats really strange, any “&” in my titles do get converted fine except for when its used within structure_entries.

You say it works for you? In the example you posted earlier (http://www.northstarenergy.co.uk/test) I see un-converted “&” characters on line 75 of your source.

       
Peter Lewis's avatar
Peter Lewis
280 posts
15 years ago
Peter Lewis's avatar Peter Lewis

Doh! I did “view selected source” which must have automatically encoded it within the browser.

Sorry - download the latest version in post one and see if this solves the problem. I’m now parsing via PHP htmlentities, but think this will cause more problems thatn it solves, as I’m pretty sure it won’t correctly render out html tags.

Give it a go and let me know if it works for what you’re doing, but I think I’ll have to end up parsing stuff manually.

       
Castlegate IT's avatar
Castlegate IT
25 posts
15 years ago
Castlegate IT's avatar Castlegate IT

Yea ive done that “view selection source” before and seen similar things… a real pain in the ass that is!

This new version is perfect and all my html entities are now converted nicely.

Thanks!

       
First 4 5 6 7 8

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.