Linking from page to page

chinni12 - March 24, 2008 - 00:01

I have created two pages page1 and page2. I promoted page 1 to front page and created link to page 2 from page 1. I used following code as link

<a href="node/6" > page2</a>

When I click on link it is showing url as below which has node repeated two times.

http://localhost/drupal/node/node/6

I have enabled clean urls. Is it right way to link pages to pages? Appreciate for any useful links to understand on how pages are created and linked with each other in Drupal.

Thanks,
Chinni

It is a problem with

UltimateBoy - March 24, 2008 - 02:17

It is a problem with relative links.. try <a href="/node/6">page 2</a>. This should solve the problem.. I would highly suggest using the core path module in conjunction with path auto to create unique URLs for all your pages.

--matt
http://www.monarch-digital.com

Generating link without drupal as prefix

chinni12 - March 24, 2008 - 23:25

I have tried the following also
&tl;a href="/node/2"> page2</a>

The above link is generating url http://localhost/node/2 which does not have drupal. So I see "object not found"

Thanks,
chinni

Sorry, I missed the drupal

UltimateBoy - March 25, 2008 - 13:52

Sorry, I missed the drupal part ;)

<a href="/drupal/node/2"> page2</a> should get what you want.

--matt
http://www.monarch-digital.com

 
 

Drupal is a registered trademark of Dries Buytaert.