First of all thanks for this cool module.
I’ve got a few questions/problems though.
Changing the order of the pages is not working. I keep getting the red ERROR showing up and all my pages are made after the installation.
First i thought this was being caused by a line of javascript.
function structure_saveMove(row,type,eid,pid,nid){nid=nid?nid:0;$.ajax({type:'GET',url:'/index.php?ACT....etc
should have been
function structure_saveMove(row,type,eid,pid,nid){nid=nid?nid:0;$.ajax({type:'GET',url:'index.php?ACT....etc
i’m testing structure locally on a site with a url like this: http://dev/www.site.com. the first line of javascript caused the request being done at http://dev/index.php, removing the / solved that. It takes a little bit longer before showing up but i’m still getting the red ERROR massage. No idea what else i could try though. Any ideas anyone?
Then something else: I’ve got a structure like in the attached image. i’m using the nav_main thing posted in this thread for the menu. For the Nieuws page i made a news_listing template. it does something like this:
{exp:weblog:entries weblog="site"}
<h1>{title}</h1>
{body}
{/exp:weblog:entries}
{exp:weblog:entries weblog="nieuws" dynamic="off"}
<a href="http://{page_url}">{title}</a><br>
{/exp:weblog:entries}
this works fine. For the news items i’ve made a news_detail template. They also show fine but the menu is not showing anymore. I guess that’s got something to do with different weblogs? Is there any way to show the menu i have on my other pages on a detail page like the news one?
Hope this is understandable. Thanks in advance for any help!
@arcoiris The first issue may be because of your development location as you found. Also, d you have PHP 5.2+? We’ll have to do some testing and get back to you on the main nav issue, not sure why it isn’t showing up for you. It will probably be several days as this is a holiday weekend.
I’ve putted Structure on a MSM installation and i have a problem. The module works right with the original site but give problems if i create a second one. With the module installed when i try to access the second site admin panel via masked access i get the following php errors:
[PHP Warning: require_once(modules/structure/mod.structure.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/originalsite.com/httpdocs/system/extensions/ext.structure_ext.php on line 5, referer http://www.secondsite.com/admin.php?S=0&C=login&M=auth
and
PHP Fatal error: require_once() [function.require]: Failed opening required ‘modules/structure/mod.structure.php’ (include_path=’.:’) in /var/www/vhosts/originalsite.com/httpdocs/system/extensions/ext.structure_ext.php on line 5, referer: http://www.secondsite.com/admin.php?S=0&C=login&M=auth
All the rest (the ee and msm installations and features) works ok. I am on a mediatemple (dv) with php 5.2.6, i have setted the openbase_dir and php_safe_mode as required to get work the msm’s sites and without the structure module installed the masked access works without flaws.
I noticed that at a point in the thread someone has got my same problem but he solved re-installing the whole thing. I can’t do that. Thanks in advance.
@arcoiris The first issue may be because of your development location as you found. Also, d you have PHP 5.2+? We’ll have to do some testing and get back to you on the main nav issue, not sure why it isn’t showing up for you. It will probably be several days as this is a holiday weekend.
yep, i do have php 5.2+. also have MSM running. will post here if i get anything to work.
Hi Travis,
Well, because I don’t have php 5.2 e I get the ERROR message so I tried to remove structure. I uninstalled everything from the control panel, and install pages. But pages doesn’t come up when I try to edit or create a new page. And sometimes I get some database errors. Structure is not installed according the module page and extension, but if I physically remove the file for the require server errors. No big deal.. I can re-install my testing site, but just checking if there’s something I can do for fix everything.
Thanks Mirko
@Mogra We’re looking into it, but masked functionality isn’t a priority. If it’s a quick fix we’ll include it in the next release.
I have found this workaround (a bit hacky): at line 5 of ext.structure_ext I’ve replaced
require_once('/modules/structure/mod.structure.php');
with the absolute path to the original site modules folder, in my case:
require_once('/var/www/vhosts/mydomain.com/httpdocs/admin/modules/structure/mod.structure.php');
It’s not ideal but i guess could work for sites managed with the MSM until an update will bring support for masked access.
I’ve installed Structure according to the directions here: http://www.ngenworks.com/software/ee/structure/
But I do not see a large “Structure” tab on top and cannot see any tree sitemap view. I have a Structure tab on the publish and edit pages though. When I create a new entry and give it a URI and a template through the Structure tab it does not appear to work properly. When I save the page the URI disappears. I’ve tried this by editing some old entries I had as pages and also by creating entirely new entries and neither way seems to work properly–the URI will not save–but I can’t tell if the pages are being saved in the Structure format since I do not have a main Structure tab and site map tree visible.
I must have done something wrong in the install but I followed the directions exactly and received no errors. Any ideas why it’s not showing up?
*** edit *** Is this a group permissions problem because when I view Modules > Structure it says no structure data, and under settings it says no permissible group. but I’m super-admin. Surely super-admin has permission, no?
Great module!
I’ve used this code that wuwongy wrote.
Does anyone know how to get the active/current page and insert class=”here”?
function nav_main() {
global $DB, $IN, $PREFS;
// get site pages data
$site_pages = $PREFS->core_ini['site_pages'];
// get current uri path
$uri = $IN->URI;
// get current entry id
$entry_id = array_search($uri, $site_pages['uris']);
// get node of the current entry
$sql = "SELECT *
FROM exp_structure AS node
INNER JOIN exp_structure AS parent
ON node.lft BETWEEN parent.lft AND parent.rgt
INNER JOIN exp_weblog_titles AS expt
ON node.entry_id = expt.entry_id
WHERE node.parent_id = 0
GROUP BY node.entry_id
ORDER BY node.lft";
$result = $DB->query($sql);
$html = '<ul id="nav">';
foreach ($result->result as $top) {
// get children
$childsql = "SELECT *
FROM exp_structure AS node
INNER JOIN exp_structure AS parent
ON node.lft BETWEEN parent.lft AND parent.rgt
INNER JOIN exp_weblog_titles AS expt
ON node.entry_id = expt.entry_id
WHERE node.parent_id = " .$top['entry_id'] ."
GROUP BY node.entry_id
ORDER BY node.lft";
$childresult = $DB->query($childsql);
// out entry uri of this loop instance
$euri = $site_pages['uris'][$top['entry_id']];
$html .= '<li>';
$html .= '<a href="http://{path=/">' . $top['title'];_ $html .= '</a>';
if ($childresult ->num_rows > 0){
$html .= '<ul>';
foreach ($childresult->result as $child) {
$childuri = $site_pages['uris'][$child['entry_id']];
$html .= '<li><a href="{path=/' . $childuri . '}">' . $child['title'] . '</li>';
}
$html .= '</ul>';
}
$html .= '</li>';
}
$html .= '</ul>';
//$html .= '<pre>' . $childsql . '</pre>
<p>’;
return $html;
}
I’ve installed Structure according to the directions here: http://www.ngenworks.com/software/ee/structure/ But I do not see a large “Structure” tab on top and cannot see any tree sitemap view. I have a Structure tab on the publish and edit pages though. When I create a new entry and give it a URI and a template through the Structure tab it does not appear to work properly. When I save the page the URI disappears. I’ve tried this by editing some old entries I had as pages and also by creating entirely new entries and neither way seems to work properly–the URI will not save–but I can’t tell if the pages are being saved in the Structure format since I do not have a main Structure tab and site map tree visible. I must have done something wrong in the install but I followed the directions exactly and received no errors. Any ideas why it’s not showing up? *** edit *** Is this a group permissions problem because when I view Modules > Structure it says no structure data, and under settings it says no permissible group. but I’m super-admin. Surely super-admin has permission, no?
try to type in something in structure URI, when creating new weblog entry. then go to: modules -> structure to see the tree sitemap.
hi,
Below is my menu navigation code.
how can i generate this menu dynamically using this module.
<pre><code> <ul class=”sf-menu”> <li class=”current”> void(0)”]Who We Are
<ul>
<li><a href="http://about-us.html">About Noor Dubai</a></li>
<li><a href="http://vision.html">Our Vision</a></li>
<li><a href="http://mission.html">Our Mission</a></li>
<li><a href="http://partners.html">Our Partners</a>
<ul>
<li><a href="http://orbis.html">ORBIS International</a></li>
<li><a href="http://lions-club-internationnal.html">Lions Club International</a></li>
</ul>
</li>
<li><a href="http://contact-us.html">Contact Us</a></li>
</ul>
</li>
<li><a href="http://what-we-do.html"><span class="navline">What We Do</span></a>
<ul>
<li><a href="http://treat.html">Treat</a></li>
<li><a href="http://prevent.html">Prevent</a></li>
<li><a href="http://educate.html">Educate</a></li>
</ul>
</li>
<li><a href="http://removed">void(0)"]<span class="navline">Why Blindness</span></a>
<ul>
<li><a href="http://facts-figures.html">Facts & Figures</a></li>
<li><a href="http://diseases-we-treat.html">Diseases we treat</a></li>
<li><a href="http://useful-links.html">Useful Links</a></li>
</ul>
</li>
<li><a href="http://how-to-help.html"><span class="navline">How to Help</span></a>
<ul>
<li><a href="http://register.html">Register</a></li>
<li><a href="http://volunteer.html">Volunteer</a></li>
<li><a href="http://donate.html">Donate</a>
</li>
</ul>
</li>
<li><a href="http://removed">void(0)"]newsroom</a>
<ul>
<li><a href="http://press.html">Press Releases</a></li>
<li><a href="http://official-speeches.html">Official Speeches</a></li>
</ul>
</li>
</ul>[/code]
Thanks
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.