20 of 27
20
Tome (Static Pages)
Posted: 10 February 2007 03:52 AM   [ Ignore ]   [ # 343 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  517
Joined  04-24-2004

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 smile

*I’m only assuming EE just backs up tables with an exp_ prefix!

 Signature 

lukestevensdesign.com · Design 2.0 · Pro Network member

Profile
 
 
Posted: 10 February 2007 06:05 AM   [ Ignore ]   [ # 344 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12273
Joined  04-29-2002

In theory Mark should be checking for:

$conf['db_prefix'] = "exp";

to decide what prefix to use. smile

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 10 February 2007 07:23 AM   [ Ignore ]   [ # 345 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

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.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 10 February 2007 07:24 AM   [ Ignore ]   [ # 346 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  517
Joined  04-24-2004

No worries smile

 Signature 

lukestevensdesign.com · Design 2.0 · Pro Network member

Profile
 
 
Posted: 10 February 2007 03:51 PM   [ Ignore ]   [ # 347 ]  
Grad Student
Avatar
Rank
Total Posts:  77
Joined  02-22-2004

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…

Profile
 
 
Posted: 10 February 2007 11:43 PM   [ Ignore ]   [ # 348 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  517
Joined  04-24-2004

Wow, that’s great, thanks for sharing wazdog!

 Signature 

lukestevensdesign.com · Design 2.0 · Pro Network member

Profile
 
 
Posted: 11 February 2007 03:43 AM   [ Ignore ]   [ # 349 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  106
Joined  07-15-2006

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.

 Signature 

Don’t settle for existence

Profile
 
 
Posted: 12 February 2007 09:31 AM   [ Ignore ]   [ # 350 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

great post wazdog, thanks for the hint.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 12 February 2007 01:18 PM   [ Ignore ]   [ # 351 ]  
Lab Assistant
RankRank
Total Posts:  108
Joined  08-18-2006

Hi,

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

Here’s my breadcrumbs code:

<div id="crumbs">
            <
p>{exp:weblog:entries weblog="education_static"}{exp:static_page_path backspace="3"}<a href="{url_title}" title="{title}">{title}</a> | {/exp:static_page_path}{/exp:weblog:entries}</p>
        </
div>

and my sub nav code:

<div id="subnavcontainer">
        
{exp:weblog:entries weblog="education_static"}{exp:static_page_path direction="post" page="0"}<a href="{url_title}" title="{title}">{title}</a>{/exp:static_page_path}{/exp:weblog:entries}
</div>


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.

Here’s a link to the test pages.

If anyone out there can help me figure out what I’m doing wrong I would greatly, greatly appreciate it. Thanks

 Signature 

qrux :: design :: photography

Profile
 
 
Posted: 12 February 2007 01:31 PM   [ Ignore ]   [ # 352 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  233
Joined  01-18-2006

@ qruxart:

I think the breadcrumb/subnav tags have to be called outside the {exp:weblog:entries} tag, instead of inside.

 Signature 

Eric Barstad
Shadow Box Creative Media Ltd.

EE Pro Network

Profile
 
 
Posted: 12 February 2007 01:55 PM   [ Ignore ]   [ # 353 ]  
Lab Assistant
RankRank
Total Posts:  108
Joined  08-18-2006

@ Eric

Wow, really? Let me try that.

Update:

I tried putting the {exp:weblog:entries} tags on the inside, but that didn’t work nor did removing them entirely.

Here’s the code now:

<div id="crumbs">
            <
p>{exp:static_page_path backspace="3"}{exp:weblog:entries weblog="education_static"}<a href="{url_title}" title="{title}">{title}</a> | {/exp:weblog:entries}{/exp:static_page_path}</p>
        </
div>

<div id="subnavcontainer">
        
{exp:static_page_path direction="post" page="0"}{exp:weblog:entries weblog="education_static"}<a href="{url_title}" title="{title}">{title}</a>{/exp:weblog:entries}{/exp:static_page_path}        
            
</div>

 Signature 

qrux :: design :: photography

Profile
 
 
Posted: 12 February 2007 02:37 PM   [ Ignore ]   [ # 354 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  233
Joined  01-18-2006

Sorry, I think it should be:

<div id="crumbs">
   <
p>{exp:static_page_path backspace="3"}<a href="{url_title}" title="{title}">{title}</a> | {/exp:static_page_path}</p>
</
div>
...
{exp:weblog:entries weblog="education_static"}{/exp:weblog:entries}

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.

This post has an example, too: http://expressionengine.com/forums/viewreply/195742/

Eric

 Signature 

Eric Barstad
Shadow Box Creative Media Ltd.

EE Pro Network

Profile
 
 
Posted: 12 February 2007 05:10 PM   [ Ignore ]   [ # 355 ]  
Lab Assistant
RankRank
Total Posts:  108
Joined  08-18-2006

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.

 Signature 

qrux :: design :: photography

Profile
 
 
Posted: 12 February 2007 06:30 PM   [ Ignore ]   [ # 356 ]  
Lab Assistant
RankRank
Total Posts:  108
Joined  08-18-2006

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?

 Signature 

qrux :: design :: photography

Profile
 
 
Posted: 12 February 2007 08:18 PM   [ Ignore ]   [ # 357 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  591
Joined  12-10-2006

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

Profile
 
 
Posted: 12 February 2007 08:22 PM   [ Ignore ]   [ # 358 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  591
Joined  12-10-2006

One more thing:

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?

Profile
 
 
Posted: 12 February 2007 08:56 PM   [ Ignore ]   [ # 359 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

@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.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 12 February 2007 09:15 PM   [ Ignore ]   [ # 360 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  591
Joined  12-10-2006

Ah ok - Thank you!!

oh - not quite - see my next post :(

Profile
 
 
   
20 of 27
20
 
‹‹ Solspace Tag Cloud      Files Module ››
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64553 Total Logged-in Users: 29
Total Topics: 81156 Total Anonymous Users: 17
Total Replies: 436586 Total Guests: 180
Total Posts: 517742    
Members ( View Memberlist )