Is there a way to create internal links? For example, in typo3 you could insert:

<LINK 453>My Link to page id 453</LINK>

Thanks,

Alan

Comments

drubeedoo’s picture

Use the following standard html in Drupal:

<a href="/node/453">My Link to page id 453</a>

If you have CleanURLs turned on, and your subject is: "My Link to page id 453," then you'll use something like:

<a href="/my-link-to-page-id-453">My Link to page id 453</a>

(Check your URL with CleanURLs turned on to see what the href URL should be to your page.)

If the above is too challenging to your users...

If you have html illiterates writing content on your site, you can download and enable the BBCode module, or load TinyMCE or FCKeditor.

tryrmdashrf’s picture

Yeah,

I was afraid of that, they had a hard time with the <LINK #ID> thing. I will try out the editors. Thanks for the list!

Alan

Nick Urban’s picture

I realize you're looking for templating for end users, but what I was looking for when I found this page was the l function.

Hopefully this will help somebody out.

mike_c’s picture

Hi,

I started using Drupal about a month ago, and have been busy migrating a website (www.duofertility.com) onto the system. I found this post because I was looking for a way to make internal links in Drupal. Because it's taken me several days to achieve what I wanted, I figured I'll post a comment here in the hope that it will save someone else some time.

I'm using Drupal 5.7, clean URLs and the pathauto module to create aliases based on page titles. I wanted to be able to link to internal pages, but I needed the links not to break when users changed page titles, thus changing pathauto URLs.

One way of doing this was to simply use the node numbers in links, but as far as I understand, that's not too good for SEO. It's better to have links that use URLs visible to search engines in the sitemap - i.e. the aliases. So, the way to do that was create links using aliased paths - but then when the titles change, the URLs change, and the links would break.

One solution I found was the path_redirect module, which would automatically create HTTP redirect pages on old aliases to the new aliases (integrated into pathauto). The disadvantage of this approach is that several changes to an alias would create a chain or redirects (unless I'm misunderstanding how redirects work?). Plus it seems messy to just create lots of redirects when the page titles change (even if it's just one letter!). It is useful for keeping pages with established page ranks live though - so I'll use it later on.

The best solution was to use the pathfilter module, which allows links to be written in the following format: "internal:home/something.html". Here is an extract from the readme file which was very useful:

Path Filter takes internal drupal paths in double quotes, written as
e.g. "internal:node/99", and replaces them with the appropriate absolute
or relative URL using drupal's url() function [1].

Suppose your site is located at 'http://example.com/mysite', clean URLs
are enabled, and 'node/99' has a URL alias of 'news/latest'. The following
are some examples of the replacements performed by this filter.

"internal:admin/user" -> "http://example.com/mysite/admin/user"
"internal:node/23" -> "http://example.com/mysite/node/23"
"internal:node/99" -> "http://example.com/mysite/news/latest"

So, I could now write links based on their node numbers, so that they wouldn't break if the aliases were changed (or deleted) - whilst at the same time retaining the alias URLs for SEO.

I hope this helps someone who is looking to solve the same problem - and please, if I've made some sort of stupid mistake or misunderstood something, I'd welcome any comments.

Cheers,

Mike

hapydoyzer’s picture

thanks !

mlncn’s picture

Is http://drupal.org/project/pathfilter

This project definitely looks to be around for the long haul, which is important for the future of your site! You could create custom snippets for a module like http://drupal.org/project/bueditor to put the "internal:" wrapping in automatically.

benjamin, Agaric Design Collective

benjamin, Agaric

ethanre’s picture

I started a new thread for Internal linking using wysiwyg http://drupal.org/node/234630

onetreehill’s picture

If using TinyMCE, (its almost worth switching if not), here's the solution:
http://drupal.org/project/linktocontent

hilikusOnline’s picture

This TinyMCE solution is only for Drupal 5, not support for 6.x yet :(

duncan.moo’s picture

In advanced Beta this looks promising as a solution to picking an internal node to link to:
http://drupal.org/project/tinymce_node_picker

Edit: I see that the links inserted by TinyMCE Node Picker are hard-coded into the content and not on a filter, so should you change the location of a page at some time you could have broken links, not ideal, but fine for my purposes.

anon’s picture

Here is a module that solves that problem
http://drupal.org/project/linkit

humedia’s picture

If you once have worked with Google Sites, linking in Drupal is really missing. Especially for clients it is difficult since basic idea is not to learn HTML, but main disadvantage, is that links are not flexible, if someone decide to optimize URL -Structure for SEO purposes it is likely to result in broken links. From my experience none of my clients is starting with best URL-Structure for SEO. Also if you know HTML takes deeply impact on productividy to lookup each time node íds or canonical names.

By the way is there any table about feature request etc.? Would be nice to have an easy overview with possibilities to rate them...

georgh’s picture

You could try Linodef http://drupal.org/project/linodef

[#id] [#id,option(s)] [#id,option(s) comment]

Linodef is an input filter for embedding content of your Drupal installation (Drupal objects) into any textarea and link to it. The tags are based exclusively on object IDs which enables a highly dynamic usage. So links won't break and the embedded content stays up to date. Editor buttons help users to find their desired object and insert the corresponding Linodef tag into the textfield.

I still haven't used it myself, but I'll try it since it seems the module I was searching for.

mmerel’s picture

I came across http://drupal.org/project/linkit and it fits my requirements: users are able to browse the 'attachment' folders and search all Nodes based on type ahead.