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

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

I use structure on a few sites and I love it. I have a new site I want to use it on, but can’t seem to remove the index.php will structure still work since you can declare specific uri’s?

       
Jack McDade's avatar
Jack McDade
425 posts
16 years ago
Jack McDade's avatar Jack McDade
I use structure on a few sites and I love it. I have a new site I want to use it on, but can’t seem to remove the index.php will structure still work since you can declare specific uri’s?

Structure uses your index.php setting – so if you use an .htaccess file to remove the index.php and set your config to blank (like non-structure sites), you’re good to go.

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

@Jack

That is the thing I am not able to remove the index.php file from .htaccess

       
huze's avatar
huze
21 posts
16 years ago
huze's avatar huze

I’m having trouble with Structure Pagination using MSM

I’m pulling listings from the news weblog of default_site doing so from a template under siteB. This pulls the entries correctly, however pagination doesn’t appear nor does the {page_uri} variable return anything. This code minus the “site” parameter works fine under an equivilent template under default_site

Here is the code:

{exp:structure:paginate show_page_total="yes" show_first_last="no" previous="« Previous" next="Next »" mode="jumping" parse="inward"}
{exp:weblog:entries weblog="news" site="default_site" orderby="date" sort="desc" limit="15" dynamic="off" disable="member_data|trackbacks|categories|category_fields"}
    <div>
        <a href="http://{page_uri}">{title}</a>
    </div>
{/exp:weblog:entries}
{/exp:structure:paginate}

Is this a feature limitation or is it possible to pull structure data from another site?

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

Cant seem to get Better Meta to work with Structure, anyone have any luck?

The structure im using is the same from the tutorial http://jambor-ee.com/tutorials/structure

any help is appreciated

Update Figured it out, make sure your url title in the Publish form tab is the same as Structure page url

       
johndwells's avatar
johndwells
94 posts
16 years ago
johndwells's avatar johndwells

Feature Request (unless I’m missing something): generate a link to the parent page.

Right now I’m achieving this with the breadcrumbs tag, but only because I know my site is only 3 levels deep: I create a breadcrumb trail but omit the home and here links, like so:

{exp:structure:breadcrumb inc_home="no" inc_here="no"}

It works, but it amounts to a hack that only works in this very specific scenario.

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

@stinhambo

RE: Sub Nav Overview link - Next version!

RE: Sub Nav UL - Next version!

RE: Categories (we chatted on AIM, but I wanted this here for everyone) category URLs do NOT work with Structure, since it uses absolute URLs/URIs lie the Pages Module. You can however switch back to the normal templating method at any time. Structure can be a simple interface to add content from your authors, but because EE’s templating is so flexible, you can display the data however you want.

@philfreo Let us know what you find in MySQL because that is indeed an issue if no entries exist. Get in touch and let us help look inside and debug if the issue persists.

       
New Tribes Mission's avatar
New Tribes Mission
2 posts
16 years ago
New Tribes Mission's avatar New Tribes Mission

@philfreo

I had the same issue today. What I did to solve it was to go to Settings and mark the weblog as Unmanaged, and also delete the entry.

Then resetting it to Structure and adding entry worked.

All of structure’s url_title settings are stored serialized in exp_sites so it’s not much use to poke in there unelss you know how to edit serialized strings.

To those having issues with pagination, it might be related to having removed index.php from your URL, in which case the ?page=2 added wont work.

Modify pagination function in mod.structure.php to this:

list($ignore, $current_page) = explode("?page=", $_SERVER['REQUEST_URI']);
if (empty($current_page)) $current_page = 1;
//$current_page = $IN->GBL('page', 'GET') ? $IN->GBL('page', 'GET') : 1;
       
VRDL's avatar
VRDL
23 posts
16 years ago
VRDL's avatar VRDL

Create a dropdown navigation that is completely dynamic.

Create a new template (general/navigation in the example). Enable PHP on input.

<?php 
global $IN, $DB, $PREFS;

$sql = "SELECT node.entry_id, expt.title 
FROM exp_structure AS node
INNER JOIN exp_weblog_titles AS expt 
    ON node.entry_id = expt.entry_id
WHERE node.parent_id = 0 
    AND node.site_id = 1
    AND (expt.status != 'closed' AND expt.status != 'Verborgen')
GROUP BY node.entry_id 
ORDER BY node.lft";

$result = $DB->query($sql);

$segment_1 = $IN->fetch_uri_segment('1');
$site_pages = $PREFS->ini('site_pages');
?>

<?php if(count($result->result) > 0): ?>
<ul>
    <?php foreach ($result->result as $entry_data):?>
    <?php $euri = trim($site_pages['uris'][$entry_data['entry_id']], '/'); ?>
    <?php if($euri == $segment_1){$here = 'here';}else{$here = '';} ?>
    <li class="<?=$here?>">
        <a href="http://{site_url}<?=$euri?>"><?=$entry_data['title']?></a>
        
        <?php if(!$euri == ''): //if the page uri is nothing, do nothing (ex. homepage)?>
        {exp:structure:nav_sub start_from="<?=$euri?>" exclude_status="Verborgen" show_depth="2"}
        <?php endif ?>
    </li>
        
    <?php endforeach ?>
</ul>
<?php endif; ?>

embed that page where your navigation to display. It outputs about the same as the sitemap but also adds the ‘here’ classes. If you have any questions, let me know.

Edit: You may have to edit the query to completely let it suit your needs (site_id and statusses).

       
Jorge Molina's avatar
Jorge Molina
12 posts
16 years ago
Jorge Molina's avatar Jorge Molina

@philfreo @newtribesmission

Having the same problem…no solution but an observation. Looked into the exp_sites table, sites_pages field contains all the urls. Not an expert at how this data is stored, but it looks like the pattern is as follows:

i:###;s:##:"/page_url/";
i = entry id
s = ???

My duplicate URI is in the serialized date b ut with no i:### value listed, so it would appear to be orphaned. Any idea as to how this can be corrected?

       
New Tribes Mission's avatar
New Tribes Mission
2 posts
16 years ago
New Tribes Mission's avatar New Tribes Mission

@Jorge Molina

What I would do is copy-paste the serialized text into a simple php page, unserialize it and do a print_r to analyze the data.

Then modify the data via php

unset($array['myorphanuri']);

then run serialize again and go to database and paste it back in.

Remember to backup your original serialized array.

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

@Verdel Automatisering

Any idea how to make a dynamic nav with dropdowns for lets say a global nav thats embeded on every page. Seems using the subnav option when im on one of the subnav pages it closes the UL after the last subnav option and repeats here last here last in <li>

Anyway to have a normal nav with dropdowns using structure?

EDIT: Works beautifully now, just make sure you have

{exp:structure:nav_sub start_from="<?=$euri?>" exclude_status="Do not show on nav" show_depth="0" show_level_classes="no"}
       
28Bytes's avatar
28Bytes
192 posts
16 years ago
28Bytes's avatar 28Bytes

I did the new overview link for the sub navigation. I seem to having the subnav tag apply the class=”here” to the overview page as well as any page that is in the same sub navigation. Any ideas? See attached screen shot.

       
Firestorm Creative Studios's avatar
Firestorm Creative Studios
21 posts
about 16 years ago
Firestorm Creative Studios's avatar Firestorm Creative Studios

trying to run logic on the sub_nav - if there are subpages, display a block of HTML, if not, don’t. best i’ve found is this tut, which i mildly adapted. a has children function would be nice, or the nav_sub returning a 0 if there’s no children pages.

http://www.tyssendesign.com.au/articles/cms/custom-expressionengine-template-solutions/

       
iain's avatar
iain
317 posts
about 16 years ago
iain's avatar iain

Am I right in saying that Structure stores details from every entry managed by Structure as a serialised array in sites_pages - same as the native EE pages module?

Has anyone noticed any performance issues with this?

       
First 52 53 54 55 56 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.