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

Craig Allen's avatar
Craig Allen
135 posts
16 years ago
Craig Allen's avatar Craig Allen

Thanks Travis. Yes, the Structure module page is what I’m after. That first option won’t work, because when I’m logged on as a user I then can’t access the modules because I’ve hidden that from them. The lg-add-cp-tabs extension is exactly what I’m in need of however. Thanks

       
Traverse's avatar
Traverse
66 posts
16 years ago
Traverse's avatar Traverse

Structure is working brilliantly here. Thanks for a fantastic Module.

Only one small feature request… 😊

On the Modules > Structure page would it be possible to have a collapse option for the listings? E.g. Hide the children of the parents?

Also, while i’m here :D How could I move the “Assets” panel be above the page listing? From an editor perspective i’m guessing users will probably tinker in the ‘Assets’ panel most.

Cheers

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

@Traverse collapsing children is on our list, but will be a while and not a high priority right now. You’re welcome to look through the code and move Assets if you’d like…

       
Electric Putty's avatar
Electric Putty
88 posts
16 years ago
Electric Putty's avatar Electric Putty

Hi Travis,

Many thanks for the latest version. We’re big fans of Structure here, it filled a major gap in EE and makes it a much more flexible tool for us.

I’ve just installed the latest version (1.2.3) and am using the {exp:structure:sitemap} feature. I’m not sure whether it’s to do with my page statuses, but it looks like the list items aren’t getting closed correctly.

You can view the output here: http://www.vhs.epwebsites.co.uk/content/site_map/

If you look at the page Rugby Club, this lives three levels down, e.g.

Home > Extra curricular > Sports clubs > Rugby club

The next element on the site map is 6th Form, which sits two levels higher, e.g.

Home > 6th Form

The sitemap method is only closing one <li> and one <ul>, rather than two, so the HTML is incomplete and the following pages are displayed at the wrong level.

Have I got a setting wrong or is this a bug? As Rugby club’s parent (Sports clubs) is the last child of it’s parent, perhaps this has caused a problem.

Many thanks,

Malcolm

       
ira42's avatar
ira42
167 posts
16 years ago
ira42's avatar ira42

Hey Travis,

Just upgraded to v.1.2.3 and have found one small issue, which MAY be just on my end, but thought I’d post here in case it’s a common bug.

On the publish page “Structure” tabs, the “Weblog:” dropdown under the listing checkbox doesn’t seem to be properly inserting the “selected” parameter. For example, the code on my page renders as:

<select name="structure_listing_weblog">
   <option value="14">Products</option>
   <option value="34">Train: Sessions</option>
</select>

Another unrelated issue, and I’m not sure but could see this causing havoc somewhere down the line, is that the Structure URI is not created in the same manner as the Weblog URL… The EE url_title field in the DB is limited to 75 characters, but not so for the Structure URI. I’m sure there will be instances where we’d want to do an exp:query on the url_title at some point, and this would cause problems as it wouldn’t match when calling the details page for entries with long titles (eg: Press Release titles…).

Thanks again!

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

@Malcolm Wax looks like it might be a bug - looking into it now thanks!

       
ira42's avatar
ira42
167 posts
16 years ago
ira42's avatar ira42

Hey there,

Sorry, you can disregard this. I believe it’s more of a workflow issue. Rather than assign several weblogs as “Structure” on the settings page, I now only do one at a time, and then assign it right away in the Publish page’s structure tab, so I never have more than one weblog name available in that dropdown (when defining the listing weblog).

Tx!

<

blockquote author=”ira42” date=”1241122207”>Hey Travis,

Just upgraded to v.1.2.3 and have found one small issue, which MAY be just on my end, but thought I’d post here in case it’s a common bug.

On the publish page “Structure” tabs, the “Weblog:” dropdown under the listing checkbox doesn’t seem to be properly inserting the “selected” parameter. For example, the code on my page renders as:

<select name="structure_listing_weblog">
   <option value="14">Products</option>
   <option value="34">Train: Sessions</option>
</select>
       
rockthenroll's avatar
rockthenroll
485 posts
16 years ago
rockthenroll's avatar rockthenroll

@ira42 than yes, that’s a workflow issue. You can only use a weblog for pages OR listings, not both.

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

v1.2.4 Bug release to fix the sitemap tag issue: http://www.ngenworks.com/software/ee/structure/

       
Thomas Jacobs's avatar
Thomas Jacobs
9 posts
16 years ago
Thomas Jacobs's avatar Thomas Jacobs

i also can’t re-order the structure items with the drag function. The row turns yellow on click but can’t be dragged to the desired position.

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

@Thomas Jacobs check your PMs

       
28Bytes's avatar
28Bytes
192 posts
16 years ago
28Bytes's avatar 28Bytes

I just installed the newest version, everything seems to be working great, except the structure tab is not formatted correctly. The “structure” folder is in the themes directory but it just seems like it can’t see it for some reason.

View Screen Shot –>

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

@PenGwnFistOfFury it needs to be WITHIN the current theme’s folder, not just in the themes directory - have you done that?

“Copy themes/structure directory to your current cp theme folder under /themes/cp_themes/your_theme”

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

Travis,

I needed to customise the pagination layout as “Page” is actually hard coded and not pulled from the language file (I’m working on a Russian website). I also wanted to re-order the display.

So I added the following single tags to be used within the “{exp:structure:paginate}” tag pair: {current_page} {total_pages} {next_page} (URL link to next page} {previous_page} (URL link to previous page}

I’ve modified v1.2.3 so the line numbers might be slightly out for mod.structure.php on the latest build:

Before line 1227 which is:

switch($location) {

I inserted the following code:

foreach ($TMPL->var_single as $key => $val) {
        if ($key == "current_page") {
             $tagdata = $TMPL->swap_var_single($val, $current_page, $tagdata);
        }
        if ($key == "total_pages") {
             $tagdata = $TMPL->swap_var_single($val, $total_pages, $tagdata);
        }
        if ($key == "next_page") {
             $tagdata = $TMPL->swap_var_single($val, "?page=" . $next_page, $tagdata);
        }
        if ($key == "previous_page") {
             $tagdata = $TMPL->swap_var_single($val, "?page=" . $previous_page, $tagdata);
        }
    }</code></pre>
And <b>within</b> the <pre><code>switch($location) {</code></pre> code that has now moved down to around line 1245 I added:
<pre><code>case 'none':
            $html = $tagdata;
            break;</code></pre>

Hope you'll see the use for this and custom pagination and include it in future builds...? :blush: Otherwise, I hope it's useful for anyone else.

Edit: So as an example...
<pre><code>{exp:structure:paginate parse="inward" location="none"}{exp:weblog:entries blah, blah...

...

{/exp:weblog:entries}
                <div id="paging">
                    {if {current_page} > 1}<a href="http://{exp:replace" class="linkprevious">Previous</a>{/if}{if {current_page} == 1}Previous{/if}
                    {if {current_page} < {total_pages}}<a href="http://{exp:replace" class="linknext">Next</a>{/if}{if {current_page} == {total_pages}}Next{/if}
                    {current_page} of {total_pages}
                </div>
{/exp:structure:paginate}

Thanks,

Peter

       
28Bytes's avatar
28Bytes
192 posts
16 years ago
28Bytes's avatar 28Bytes

@rockthenroll it goes into the default folder, gotcha. Was that always like that?

       
First 36 37 38 39 40 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.