Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pages showing up as index.php?id= Children
#1
Hey everyone, I just got started with GS today, and I'm really enjoying the flexibility.However, I have a problem. I don't exactly know how the get_navigation(); function works. When I create new pages, they show up as index.php?id=thepage children almost. For example, I have a home page that is accessible via the navigation menu:
Code:
<div id="nav">
<?php get_navigation(); ?>
</div>

Another, separate, page, though, called Events, doesn't show up in the navigation menu and is only accessible via:
Code:
mysite/index.php?id=events

How do I fix this problem so all my pages show up in the navigation?!

Any help would be appreciated,
Nick
Reply
#2
Can you confirm that each page has the "Add to Menu" check box checked and you have a menu text" entered and a "page priority" set.

You will always need to tell it to add to menu but the name and page priority shook self populate (but can be changed.)
JWH Technologies
Have any marketing ideas for Get-Simple? Let me hear them!
Reply
#3
OWS_Matthew Wrote:Can you confirm that each page has the "Add to Menu" check box checked and you have a menu text" entered and a "page priority" set.

You will always need to tell it to add to menu but the name and page priority shook self populate (but can be changed.)

Thanks, that fixed the menu problem! Smile

Does anyone know how to get rid of the index.php?id=thispage whole deal?
Reply
#4
In conjunction, for some reason my CSS style seems to not apply to the automatically generated menu. The menu displays as a plain list with unstyled links!

How do I style that?

my current code is:

Code:
#nav {
width: auto;
height: 40px;
float: right;
margin-top: 40px;
}

#nav ul {
display: block;
}

#nav ul li {
display: block;
float: left;
margin-left: 10px;
font-size: 15px;
}

#nav ul li a {
display: block;
height: 40px;
padding: 0 7px 0 7px;
color: #FFB777;
text-decoration: none;
font-size: 15px;
line-height: 40px;
}

#nav ul li a {
color: #fff;
border-bottom: 1px solid #fff;
}
Reply
#5
For your first question, you will need to enable fancy urls within the settings page. (if your GS install is in a sub-folder you may need to edit your .httacces file.

I am on my iPhone so I can't really replicate the problem your having with your navigation. I will be in my office in about 45 minutes and I will try to replicate your problem then. Your CSS looks fine from here.
JWH Technologies
Have any marketing ideas for Get-Simple? Let me hear them!
Reply
#6
I take that back, I believe your issue is in your HTML, I don't believe the generated navigation contains a <ul> & </ul>

So your code should look like so:
Code:
<div id="nav"><ul><?php get_navigation(); ?></ul></div>
JWH Technologies
Have any marketing ideas for Get-Simple? Let me hear them!
Reply
#7
Thanks so much for your help. Now, how to configure the menu so that there is a class of current applied to the current page?
Reply
#8
I believe the core function automatically generates the following code:
Code:
<ul>
<li class="current"><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
</ul>

with that being said, you will need to add the following to your css:
Code:
#nav {
width: auto;
height: 40px;
float: right;
margin-top: 40px;
}

#nav ul {
display: block;
}

#nav ul li {
display: block;
float: left;
margin-left: 10px;
font-size: 15px;
}

#nav ul li a {
display: block;
height: 40px;
padding: 0 7px 0 7px;
color: #FFB777;
text-decoration: none;
font-size: 15px;
line-height: 40px;
}

#nav ul li a:hover {
color: #fff;
border-bottom: 1px solid #fff;
}

#nav ul li a .current {
color: #CCC;
border-bottom: 1px solid #fff;
}

I added the a:href to your last css style and I added a new style with the .current class attached to the end.

Let me know if this works, if not I will need a link to your page or a copy of the produced navigation.
JWH Technologies
Have any marketing ideas for Get-Simple? Let me hear them!
Reply
#9
Unfortunately, the code generated for my menu doesn't have a class of current applied to any of the list items? Is there something in the settings I can alter to make this possible?
Reply
#10
No, if it doesn’t generate it, it doesn’t exist in the code. The multilevel navigation plugin offers a current class. Although I, like Matt, thought it was implemented in the standard one too. The GetSimple homepage has a current class on the menu and I don’t think they’re using my plugin.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#11
Yeah, I realized the code generated doesn't add the
Code:
<li class='current index'></li>
instead it adds
Code:
<li class='index'></li>


why???? Sad
Reply
#12
It does work... i have it working on a test account and on get-simple.info.

1. Do you have Fancy URLs on?
2. Can you send us a link to your page so we can see for ourselves?
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#13
Using the internal get_navigation() funtion the 'current' class will only be added to the selected page, and only it that page has the
menu flag set in the "Page Options" section.

So if you have a menu like :

About
Services
Contact

and you on the Services page the code generated should be:

Code:
<ul>
<li class='index'>About</li>
<li class='services current'>Services</li>
<li class='contact'>Contact</li>
</ul>

The other class is the slug name.

If you go to the "Contact" page it should regenreate as :


Code:
<ul>
<li class='index'>About</li>
<li class='services'>Services</li>
<li class='contact current'>Contact</li>
</ul>

if however you go to page that isn't on the menu the current class will not be displayed.


Code:
<ul>
<li class='index'>About</li>
<li class='services'>Services</li>
<li class='contact'>Contact</li>
</ul>


Mike.
My Github Repos: Github
Website: DigiMute
Reply
#14
Here's a sample setup of my website on a free host.

troop22.byethost6.com

Thanks for any help. Smile
Reply
#15
hmm... i agree it doesnt look to be working correctly. Are you sure you are showing your navigation with the correct template tag? (get_navigation)

Can we see the code from your template.php file?
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#16
I just installed a the beta (GS 2.04) with the default GS theme and the navigation works perfectly..

What version of getsimple are using?
JWH Technologies
Have any marketing ideas for Get-Simple? Let me hear them!
Reply
#17
OWS_Matthew Wrote:I just installed a the beta (GS 2.04)

Since you already have it installed, you might as well test the hell out of that bad boy for us!
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#18
ccagle8 Wrote:
OWS_Matthew Wrote:I just installed a the beta (GS 2.04)

Since you already have it installed, you might as well test the hell out of that bad boy for us!

Working on it!
JWH Technologies
Have any marketing ideas for Get-Simple? Let me hear them!
Reply




Users browsing this thread: 1 Guest(s)