[Campsite Support] Section links working weird

View: New views
2 Messages — Rating Filter:   Alert me  

[Campsite Support] Section links working weird

by phorum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Author: Terix
Link:  http://code.campware.org/phorum/read.php?8,7686,7686#msg-7686
--------------------------------------------------------------------------------

Hi everybody,

i've put sections links on my navigationtemplate like this way:

{{ local }}
{{ set_current_issue }}
{{ set_section number="1" }}
link1 |
{{ set_section number="2" }}
link2 |
{{ set_section number="3" }}
link3 |
{{ set_section number="4" }}
link4 |
{{ set_section number="5" }}
link5
{{ /local }}

the weird thing is that if i use "http://localhost" to go to the site, the sections links work right... but if i use a relative link, like href="/index.php", all the section links points to localhost/index.php...

how do i fix this? I need a relative link to the home page for the "homepage" link.

I can't use the "list section" code bee i need to personalize the section links

--
Sent from Campware Forums
http://code.campware.org/phorum

Parent Message unknown Re: [Campsite Support] Section links working weird

by Mugur Rus-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Campsite generates the URL based on it's own rules and it can recognize only the URLs generated by Campsite. If you wrote the URL manually the template loading will not work anymore. So please use the following code to generate links:

{{ set_section number="1" }}
<a href="{{ uri }}">{{ $campsite->section->name }}</a>&nbsp;|
...

On Thu, Oct 15, 2009 at 12:00 PM, <phorum@...> wrote:
Author: Terix
Link:  http://code.campware.org/phorum/read.php?8,7686,7686#msg-7686
--------------------------------------------------------------------------------

Hi everybody,

i've put sections links on my navigationtemplate like this way:

{{ local }}
{{ set_current_issue }}
{{ set_section number="1" }}
link1&nbsp;|
{{ set_section number="2" }}
link2&nbsp;|
{{ set_section number="3" }}
link3&nbsp;|
{{ set_section number="4" }}
link4&nbsp;|
{{ set_section number="5" }}
link5
{{ /local }}

the weird thing is that if i use "http://localhost" to go to the site, the sections links work right... but if i use a relative link, like href="/index.php", all the section links points to localhost/index.php...

how do i fix this? I need a relative link to the home page for the "homepage" link.

I can't use the "list section" code bee i need to personalize the section links

--
Sent from Campware Forums
http://code.campware.org/phorum