Hey Mark, a tiny issue I came across, don’t know if it’s been mentioned - because the module installs the DB table without an exp_ prefix*, EE’s backup tool doesn’t include the Pages table in its mysql dump. Of course there’s always phpmyadmin etc when backing up/migrating, but just thought I’d mention it
*I’m only assuming EE just backs up tables with an exp_ prefix!
I chose not to use the default prefix, because I didn’t want EE to see my table. Since the pages table is not a part of EE utilities built for EE shouldn’t see it, it may confuse them. Keeping it separate ensures that any actions taken to the EE tables will not affect the pages table. Also, even if I did use the default prefix, I still don’t think the backup would see it because it has a hardcoded list of tables to look at.
In response to this workaround for not being able to use segment variables, I came up with another one that doesn’t require using php in your templates…
Just replace the $global_vars in your path.php file with the following (make sure to add in any additional $global_vars you’ve created into this array:
$segs = explode("/", $_SERVER['PATH_INFO']); $global_vars = array( "seg_1" => $segs[1], "seg_2" => $segs[2], "seg_3" => $segs[3], "seg_4" => $segs[4], "seg_5" => $segs[5], "seg_6" => $segs[6], "seg_7" => $segs[7], "seg_8" => $segs[8], "seg_9" => $segs[9] ); // Last entry must not include the comma at the end
The $segs variable that comes before the $global_vars array is crucial, be certain to add it in.
Now you can use {seg_1} in place of {segment_1}. Even in “if” statements, such as {if seg_1}{/if} or {if seg_1 == “news"}{/if}.
It’s still a workaround, but for me this is easier than the earlier php workaround…
Ditto Luke’s comment, Wazdog - awesome, thanks! I just got the php to work - don’t understand how or why it works or what it’s up to, but it works, but this way I do understand, and is way easier to do, at least from my point of view, than the php. Thanks for posting it up here.
You know I’d really love to use this module on this rather large site I’m working on but I just can’t seem to get it to work properly. I’m working on some tests but it just doesn’t seem to work as stated. I’ve seen so many people rave about this module but I just keep banging my head against the wall trying to figure out what I’m doing wrong. I’m hoping the forums can help me figure this out. Here’ my test nav structure:
Programs for Adults
--Outdoor Programs
----Nature by Kayak
Programs for Children
--Junior Biologist Programs
----Preschool Programs
------Slippery to Prickly
I’ve installed all elements correctly, I’m using version 3.5.9
When I navigate to the pages they only show the page I’m on in both the crumbs and subnav, as opposed to showing me the breadcrumb path and nav menu as stated should happen in the instructions.
In other words, the two tags are separate from each other (I’m sure I haven’t explained that well—hopefully someone else might be able to clear things up.
WOW I think I got it to work! Thanks a billion for pointing me to that post Eric. His tutorial docs helped immensely. Like everything in EE, the truth is out there it’s just a matter of finding it. Cheers.
Now that I have the plugin working, does anyone have experience with using the pages module with the Repeet plugin? Some of my static pages will also be used in a calendar of events, with repeating entries and the like. The Repeet plugin displays the static page entries just fine, providing you include it’s weblog in the parameters, but it poses a bit of a problem when you want to link to the static page from the calendar. How would you include a link to a static page that is essentially a very long url created by categories? Anybody have any ideas?
Create a weblog called Content (for example), and then create a new template which calls up your {defined_fields} (See reference code below). You’ll also need to create a category group and assign it to the weblog. This category group should reflect the structure of the pages you want.
ie:
Home
Meet the team
—Staff 1
—Staff 2
Contact
Is it possible to create multiple weblogs with static content using this plugin?
For example, I have a few static pages under the ‘about’ section, and a few under the ‘donate’ section, but I don’t want to create just one weblog for static content [e.g. ‘content’]. I want to do this because then my url’s will be shorter, more SE friendly and more intuitive.
For example, I want to avoid these:
http://www.mysite.com/index.php/content/about/blah
http://www.mysite.com/index.php/content/donate/blah
And use these instead:
http://www.mysite.com/index.php/about/blah
http://www.mysite.com/index.php/donate/blah
If I have a ‘home’ page which pulls in content from various other dynamic sections/weblogs, but content is not diectly published to it, does this mean my home page should be static or dynamic?
@Adaw12: you shouldn’t need to have /content in your URL if you don’t want. the url is generated by the category structure, so if you have your categories laid like this:
about -- blah -- blah donate --foo --bar
then your url would be /about/blah, or /donate/foo (not /content). content is only used as the weblog name it should not appear in the URL.