Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Problems with my menu nav
Hello
I´m having a problem with my menu nav
<ul>
<li<txp:if_section name=""> class="home_current"</txp:if_section>><txp:link_to_home>Inicio</txp:link_to_home></li>
<li<txp:if_section name="trabajo"> class="work_current"</txp:if_section>><txp:section link="1" title="1" name="trabajo" /></li>
<li<txp:if_section name="servicios"> class="services_current"</txp:if_section>><txp:section link="1" title="1" name="servicios" /></li>
<li<txp:if_section name="conoceme"> class="about_current"</txp:if_section>><txp:section link="1" title="1" name="conoceme" /></li>
<li<txp:if_section name="blog"> class="blog_current"</txp:if_section>><txp:section link="1" title="1" name="blog" /></li>
<li<txp:if_section name="contactame"> class="contact_current"</txp:if_section>><txp:section link="1" title="1" name="contactame" /></li>
</ul>
Only show the index button but the anothers sections no. I have created a section “trabajo” and the article that call this section but nothing happens. I can´t see my error.
When i write mydomine.com/trabajo i have this error
I don´t know why because like i say before i create a section and article.
Not found
bq. The requested URL /trabajo was not found on this server.
bq. Apache/2.0.54 Server at www.mydomine.com Port 80
Thanks for your help
Seba
Last edited by sebatorresi (2009-09-21 14:17:18)
Sonríe | Smile . <txp:lover />
Offline
#2 2009-09-21 14:46:29
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Problems with my menu nav
sebatorresi wrote:
(…) Only show the index button but the anothers sections no.
Can you post a tag trace of a page that shows this?
The requested URL /trabajo was not found on this server.
Does it work if you go to site.com/?s=trabajo
?
Offline
Re: Problems with my menu nav
Hi
this is the code that i have on the bottom
<txp:rvm_css format="link" n="main" />
<txp:output_form form="menu" />
[SQL (0.00049495697021484): select Form from txp_form where name='menu']
[Form: menu]
<txp:if_section name="">
[<txp:if_section name="">: true]
</txp:if_section>
<txp:link_to_home>
</txp:link_to_home>
<txp:if_section name="trabajo">
[<txp:if_section name="trabajo">: false]
</txp:if_section>
<txp:section link="1" title="1" name="trabajo" />
[SQL (0.00032997131347656): select title from txp_section where name='trabajo']
<txp:if_section name="servicios">
[<txp:if_section name="servicios">: false]
</txp:if_section>
<txp:section link="1" title="1" name="servicios" />
[SQL (0.00027799606323242): select title from txp_section where name='servicios']
<txp:if_section name="conoceme">
[<txp:if_section name="conoceme">: false]
</txp:if_section>
<txp:section link="1" title="1" name="conoceme" />
[SQL (0.00048518180847168): select title from txp_section where name='conoceme']
<txp:if_section name="blog">
[<txp:if_section name="blog">: false]
</txp:if_section>
<txp:section link="1" title="1" name="blog" />
[SQL (0.00044012069702148): select title from txp_section where name='blog']
<txp:if_section name="contactame">
[<txp:if_section name="contactame">: false]
</txp:if_section>
<txp:section link="1" title="1" name="contactame" />
[SQL (0.00046300888061523): select title from txp_section where name='contactame']
The URL thing is the clean URL, no?
Last edited by sebatorresi (2009-09-21 15:45:38)
Sonríe | Smile . <txp:lover />
Offline
#4 2009-09-21 16:21:59
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Problems with my menu nav
sebatorresi wrote:
The URL thing is the clean URL, no?
Yes.
But what I don’t understand – unless I misunderstood you – is that this code doesn’t show the menu items for the sections. The only reason could be that they don’t exist… Are you sure the section names are exactly ‘trabajo’, ‘servicios’ etcetera? No capitals used?
Offline
Re: Problems with my menu nav
All is ok, i´m not using capitals.
When i see the source code i can see the url “trabajo” but not the button.
When i go to mydomine.com/?s=trabajo? i can see the “trabajo” button but no the “home” button.
Sonríe | Smile . <txp:lover />
Offline
#6 2009-09-21 18:37:20
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Problems with my menu nav
Ah, OK. I think switching to ‘messy’ permanent link mode will stop you getting 404s for the moment. You can try and take care of that problem seperately.
I’m guessing the problem is in your CSS, could you post the CSS for your menu? Or do you have a link to the site?
Offline
Re: Problems with my menu nav
If i put this works fine
<div id="menu">
<ul>
<li class="home_current"><a href="/">inicio <em>Una breve introducción</em></a></li>
<li class="work"><a href="#">trabajo <em>loremp ipsum</em></a></li>
<li class="services"><a href="#">servicios <em>loremp ipsum</em></a></li>
<li class="about"><a href="#">conóceme <em>loremp ipsum</em></a></li>
<li class="blog"><a href="#">blog <em>loremp ipsum</em></a></li>
<li class="contact"><a href="#">contáctame <em>loremp ipsum</em></a></li>
</ul>
</div><!-- #menu -->
but with the code that i put before no
Thanks
Sonríe | Smile . <txp:lover />
Offline
#8 2009-09-21 19:10:21
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Problems with my menu nav
This should work:
<ul>
<li<txp:if_section name=""> class="home_current"<txp:else /> class="home"</txp:if_section>><txp:link_to_home>Inicio</txp:link_to_home></li>
<li<txp:if_section name="trabajo"> class="work_current"<txp:else /> class="work"</txp:if_section>><txp:section link="1" title="1" name="trabajo" /></li>
<li<txp:if_section name="servicios"> class="services_current"<txp:else /> class="services"</txp:if_section>><txp:section link="1" title="1" name="servicios" /></li>
<li<txp:if_section name="conoceme"> class="about_current"<txp:else /> class="about"</txp:if_section>><txp:section link="1" title="1" name="conoceme" /></li>
<li<txp:if_section name="blog"> class="blog_current"<txp:else /> class="blog"</txp:if_section>><txp:section link="1" title="1" name="blog" /></li>
<li<txp:if_section name="contactame"> class="contact_current"<txp:else /> class="contact"</txp:if_section>><txp:section link="1" title="1" name="contactame" /></li>
</ul>
You could automate this even further (it would require that you change your CSS class names into the exact section names):
<txp:section_list wraptag="ul" break="" include_default="1" default_title="Inicio" sections=",trabajo,servicios,conoceme,blog,contactame">
<li class="<txp:section /><txp:if_section name='<txp:section />'>_current</txp:if_section>"><txp:section title="1" link="1" /></li>
</txp:section_list>
(edit: added the include_default
and default_title
attributes in the section_list tag.)
Last edited by els (2009-09-21 19:35:33)
Offline
Re: Problems with my menu nav
You have messy URL’s so that needs to be fixed. Then you have incorrect a
links:
<li><a rel="home" href="http://www.sebastiantorresi.com/">Inicio <em>loremp ipsum</em></a></a></li>
<li class="work_current"><a href="http://www.sebastiantorresi.com/index.php?s=trabajo">trabajo</a> <em>loremp ipsum</em></a></li>
Should be:
<li><a rel="home" href="http://www.sebastiantorresi.com/">Inicio <em>loremp ipsum</em></a></li>
<li class="work_current"><a href="http://www.sebastiantorresi.com/index.php?s=trabajo">trabajo <em>loremp ipsum</em></a></li>
You have some issues here too:
<li> <em>loremp ipsum</em></a></li>
Check your validator first…
Offline
Re: Problems with my menu nav
Ohh thanks!!!
You are the best Els!!!
Now i understand much better textpattern :)
Thanks jstubbs.
Last edited by sebatorresi (2009-09-21 19:58:40)
Sonríe | Smile . <txp:lover />
Offline
Re: Problems with my menu nav
the em
is wrong there (in the second li
) because in “home” i have open and close the tag but in “trabajo” is not.
How can i do to close the section tag
to put the em
into the a
tag?
Sonríe | Smile . <txp:lover />
Offline
Re: Problems with my menu nav
Not sure what you mean, but this is what I see in the source:
<li class="home_current"><a rel="home" href="http://www.sebastiantorresi.com/">Inicio <em>breve introducción</em></a></li>
<li class="work"><a href="http://www.sebastiantorresi.com/index.php?s=trabajo">trabajo</a> <em>mis trabajos</em></li>
<li class="services"><a href="http://www.sebastiantorresi.com/index.php?s=servicios">servicios</a><em>lo que se hacer</em></li>
Which seems fine, followed by:
<li class="about"></li>
<li class="blog"></li>
<li class="contact"></li>
Last edited by jstubbs (2009-09-21 20:24:31)
Offline