Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-11-10 09:55:35

heternova
Member
Registered: 2007-01-26
Posts: 14

Navigation with html and sections

Hi all,
I am going crazy… I want to add a menu based on sections. Without using <txp:section_list /> because one of the link is not a section, just a link inside a page. I am using messy url because I have a conflict with the configuration of Apache.

The code is the following:

<ul class="mainnav" id="uno"> <li class="current"><a href="#"><img src="img/news.png" alt="news" /></a></li> <li><a href="kurse/"><img src="img/kurse.png" alt="kurse" /></a></li> <li><a href="#montag"><img src="img/anmeldung.png" alt="anmledung" /></a></li> <li><a href="auftritte/"><img src="img/auftritte.png" alt="auftritte" /></a></li> </ul>

This should be very very easy, and I have already used the same stuff for other websites. This time is not working.
This is the link to the website: http://server43.hostpoint.ch/~alicialo/alicialopez.ch/

When you click on the link-section of the main menu I have an error. What’s wrong with that? It’s because I am using messy url? I do not understand. When I click on the kurse.png I should land on the kurse/ section.

Many thanks for any help
Mauro

Last edited by heternova (2010-11-10 10:37:26)

Offline

#2 2010-11-10 11:28:33

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,688
Website

Re: Navigation with html and sections

If you are using messy urls, you need to make your section links as ?s=section-name, e.g.

<ul class="mainnav" id="uno">
   <li class="current"><a href="#"><img src="img/news.png" alt="news" /></a></li>
   <li><a href="?s=kurse"><img src="img/kurse.png" alt="kurse" /></a></li> 
   <li><a href="#montag"><img src="img/anmeldung.png" alt="anmeldung" /></a></li>
   <li><a href="?s=auftritte"><img src="img/auftritte.png" alt="auftritte" /></a></li>
</ul>

If I recall correctly, you should be able to use <a href="<txp:site_url /><txp:section link="1" url="1" />"> and the link will be formed by textpattern using the url-scheme as set in the settings.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2010-11-10 13:24:05

heternova
Member
Registered: 2007-01-26
Posts: 14

Re: Navigation with html and sections

Hi Jakob,
Thank you, it works fine!

Best regards
Mauro

Offline

Board footer

Powered by FluxBB