22 of 27
22
Tome (Static Pages)
Posted: 18 February 2007 02:06 PM   [ Ignore ]   [ # 379 ]  
Grad Student
Avatar
Rank
Total Posts:  51
Joined  07-05-2006

I know this has been covered before, but I’m busy setting up a new site that relies heavily on this module, and I want to do this the cleanest way from the beginning.

Has any progress been made in handling subnavigation—that is, a {static_page_path direction=“post” /} that only shows the children of the active parent? I see the previous PHP solution but I really desperately want to keep it simple. Is this going to make it into the module itself anytime soon? Or has somebody thought of a brilliant solution that I’ve missed?

Thanks for your time.

 Signature 

– Andrew


PCA Great Performances, Portland, Maine

Profile
 
 
Posted: 18 February 2007 08:09 PM   [ Ignore ]   [ # 380 ]  
Grad Student
Avatar
Rank
Total Posts:  70
Joined  05-06-2006

Thanks for the reply Mark! I understand now, I misunderstood the scope of the module/plugin. The main reason for the different weblogs is simply the massive differences in the data that needs to be on these pages. What I think I may do in that case is make them all “dynamic”. This will allow a “1 entry” to appear after the category in the list so at least the client will still be able to go to an edit list and see the one entry. This will allow me to keep the pages structure which they will still find very useful!

thanks again!

Profile
 
 
Posted: 19 February 2007 06:50 AM   [ Ignore ]   [ # 381 ]  
Summer Student
Total Posts:  20
Joined  02-10-2007

HI

I fixed that prblem and managed to get the static pages working fine - thank you.

I now have another problem. I have an include for a header with a conditional statement to show a class=‘current’ dependant on the segment_1 - this works fine on all pages except the static page. The code for the header is below: Services and Accesibility are using static page and are the only two which do not work.


<ul>

      {if segment_1==”“}
      <li><a href=“http://www.weeann.co.uk/index.php” title=“home” class=“current”><span>HOME</span></a></li>
      {if:else}
      <li><a href=“http://www.weeann.co.uk/index.php” title=“home”><span>HOME</span></a></li>
      {/if}

        {if segment_1==“services”}
      <li><a href=“http://www.weeann.co.uk/index.php/services” title=“services” class=“current”><span>SERVICES</span></a></li>
      {if:else}
      <li><a href=“http://www.weeann.co.uk/index.php/services” title=“services”><span>SERVICES</span></a></li>
      {/if}

   
      {if segment_1==“portfolio”}
        <li><a href=“http://www.weeann.co.uk/index.php/portfolio” title=“portfolio” class=“current”><span>PORTFOLIO</span></a></li>
      {if:else}
      <li><a href=“http://www.weeann.co.uk/index.php/portfolio” title=“portfolio”><span>PORTFOLIO</span></a></li>
      {/if}


        {if segment_1==“journal”}
        <li><a href=“http://www.weeann.co.uk/index.php/journal” title=“journal” class=“current”><span>JOURNAL</span></a></li>
      {if:else}
      <li><a href=“http://www.weeann.co.uk/index.php/journal” title=“journal”><span>JOURNAL</span></a></li>
      {/if}

        {if segment_1==“accessibility”}
        <li><a href=“http://www.weeann.co.uk/index.php/accessibility” title=“accessiblity” class=“current”><span>ACCESSIBILITY</span></a></li>
      {if:else}
      <li><a href=“http://www.weeann.co.uk/index.php/accessibility” title=“accessiblity”><span>ACCESSIBILITY</span></a></li>
      {/if}


        {if segment_1==“contact”}
        <li><a href=“http://www.weeann.co.uk/index.php/contact” title=“contact” class=“current”><span>CONTACT</span></a></li>
      {if:else}
      <li><a href=“http://www.weeann.co.uk/index.php/contact” title=“contact”><span>CONTACT</span></a></li>
      {/if}


  </ul>

 

Thanks, Ann

Profile
 
 
Posted: 19 February 2007 09:08 AM   [ Ignore ]   [ # 382 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1194
Joined  01-05-2006

on the static page template try this:

{if static_page_name == "services"}
...
{/if}

{if static_page_name
== "accessibility"}
...
{/if}

 Signature 

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

Profile
 
 
Posted: 19 February 2007 12:30 PM   [ Ignore ]   [ # 383 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  183
Joined  03-21-2006

Has there been an update to this module lately?

I’m not sure I’ve seen the static_page_name before!  That is awesome.

 Signature 

http://www.sethaldridge.com/

Profile
 
 
Posted: 19 February 2007 02:34 PM   [ Ignore ]   [ # 384 ]  
Summer Student
Total Posts:  20
Joined  02-10-2007

That worked a treat Mark, thank you very much

Ann

Profile
 
 
Posted: 21 February 2007 12:21 PM   [ Ignore ]   [ # 385 ]  
Lab Assistant
RankRank
Total Posts:  115
Joined  10-31-2006

Hey Mark!

I’m working with the page attribute of the static_page_path plugin. It seems to parallel the category attribute of the exp:weblog:entries tag. I wonder if it would be possible to add support for specifying multiple values for page in the same way? That is:

And as with some of the other parameters, you can stack categories to get entries with any of those categories:

category="2|45|4|9"


Or use “not” to exclude categories

category="not 4|5|7"


And, you can use an inclusive stack to only get entries with all of the categories:

category="3&7&8"


Or you can negate the inclusive stack and get entries that do not of all of those categories:

category="not 3&5"

Now, in my case, I wrote my own “pages_navigation” plug-in, 90% of which is your pi.static_page_path.php, but which does a few things differently. So if you did add this functionality, I would then steal it and put it into my plugin. smile

Finally: the problem I’m trying to solve, in case you’re curious, is that our site has both a top navigation bar and a side navigation bar. Both bars contain static pages. But because I can only specify a single category group to use with Pages, all of the static pages are in the same group. This causes problems because I want only some of them to appear in the automatically-generated top nav, and the rest in the side nav.

Cheers!
Ben

Profile
 
 
Posted: 21 February 2007 02:01 PM   [ Ignore ]   [ # 386 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1194
Joined  01-05-2006

Ben,

Have you tried using the depth= attribute to specify the top nav only pulls in a depth of “1” and maybe the side nav starts at a parent category named subnav and pulls all the children of subnav?

mark.

 Signature 

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

Profile
 
 
Posted: 21 February 2007 02:39 PM   [ Ignore ]   [ # 387 ]  
Lab Assistant
RankRank
Total Posts:  115
Joined  10-31-2006

No, I never thought of that. Sigh. smile So I’d need two ‘parent’ folders in my static page category, one for top nav and one for side nav. Otherwise one or the other of the navs would contain the other.

It’s not optimal, because it adds a layer of categories into my content which is based only on presentation, but it would work.

This whole idea may be doomed, though; ultimately my users are going to want items in the nav bar which aren’t pages at all, but links to other web sites. I can see it coming. smile

Cheers,
Ben

Profile
 
 
Posted: 22 February 2007 08:53 AM   [ Ignore ]   [ # 388 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  227
Joined  02-01-2007

Guys/Gals

Great module, sorry to have to ask this, but I am stuck.

I have been working on this for a couple of days. So far I am able to see my static entries by following the View page link, and have mixed in feeds from other weblogs into a static page, so I think I am nearly there.

Two questions.

1. Why when I follow the View Page link, why do I see the URL as follows?

www.mysite.com/index.php/A%20description%20of%20us.

where

A%20description%20of%20us.

is the text I have used in the ‘Category Description’ of the category being displayed?

2. When I try to navigate to the page using the URL like so

www.mysite.com/index.php/about_us

I get the page that I have set to replace the 404 page?

If this helps, I have checked all of the things that are listed in this post like extension enabled, parent categories, etc..

Thanks in advance.

Adam

 Signature 

Adam Wiggall.

Profile
 
 
Posted: 22 February 2007 08:56 AM   [ Ignore ]   [ # 389 ]  
Grad Student
Avatar
Rank
Total Posts:  51
Joined  07-05-2006

This module hijacks the category description field to allow you to customize the URL. Leave it blank to allow it to choose the URLs automatically based on the category title.

 Signature 

– Andrew


PCA Great Performances, Portland, Maine

Profile
 
 
Posted: 22 February 2007 09:52 AM   [ Ignore ]   [ # 390 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  227
Joined  02-01-2007

Thanks for that!!!

Worked first time.

How I wished I had posted that question yesterday afternoon.

 Signature 

Adam Wiggall.

Profile
 
 
Posted: 22 February 2007 03:34 PM   [ Ignore ]   [ # 391 ]  
Summer Student
Avatar
Total Posts:  17
Joined  09-14-2006

I have a question about the static_page_path extension. Is it possible to show all children when you are on a static child page? For instance…

This is my page structure:

About Us
—Our Staff
——President
——VP
——Janitor

So when I’m on the Our Staff page, my sidebar nav (using static_page_path) is like so:

—President
—VP
—Janitor

But when I click on one of these pages, I lose the nav since it’s going down a level. Does anyone know how to set it up to retain the nav on an equal level page?

Profile
 
 
Posted: 23 February 2007 03:07 PM   [ Ignore ]   [ # 392 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  227
Joined  02-01-2007

Sorry, another question.

I have the pages configured and working, but I think I am missing something.

I have written an entry called Homepage. It is a static entry to be used as the main text when people hit the index of the site. I have set up pages to use ‘site/index’ as its template.

Now…

when I go to

www.mysite.com/index.php/homepage

I see the page as I would like it, the intro text at the top, then some entries from other weblogs following on, great!

But, I would like that homepage text to display on

www.mysite.com/index.php

I have the same code in the index page but it renders nothing. I can sort of understand that it would need to know which static entry I want displayed, but try as I might, I cannot get it to work.

Thanks again in advance.

 Signature 

Adam Wiggall.

Profile
 
 
Posted: 23 February 2007 03:58 PM   [ Ignore ]   [ # 393 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  227
Joined  02-01-2007

IGNORE MY LAST QUESTION!!!

Sorry, I have now read back a few pages and found the answer to my question.

This module now officially ‘rocks’, and if I can get it going, anyone can.

Have a good weekend all.

Adam

 Signature 

Adam Wiggall.

Profile
 
 
Posted: 24 February 2007 07:15 AM   [ Ignore ]   [ # 394 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1194
Joined  01-05-2006

hey adamwiggall, I’m glad you got it all straight!

 Signature 

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

Profile
 
 
Posted: 24 February 2007 11:05 AM   [ Ignore ]   [ # 395 ]  
Summer Student
Avatar
Total Posts:  17
Joined  09-14-2006

ANy help for post #391? Pretty please - I read through this post a couple times and couldn’t find anything to help. Does my question make sense? I think it’s pretty common to see subnav stay when you click on other pages in the same level. Is this possible?

Thanks!!!!

Profile
 
 
Posted: 24 February 2007 02:14 PM   [ Ignore ]   [ # 396 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  785
Joined  07-18-2006

I was having the same issue.  The automated nav and the lack of pagination made me have to pull the plug on Pages for the current project I’m working on unfortunately.  It’s a very cool module but because it’s a module and not built-in functionality it makes for some tough choices.  I’d love to hear if anyone has a good way to automate the nav - I’m just about to start in on a custom plug-in because I haven’t found anything that will do what I need to do :(

Profile
 
 
   
22 of 27
22
 
‹‹ 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: 66467 Total Logged-in Users: 32
Total Topics: 84862 Total Anonymous Users: 16
Total Replies: 455349 Total Guests: 191
Total Posts: 540211    
Members ( View Memberlist )