[support] theming primary links, or absolute paths when drupal is in a sub-directory

Amanda B Hickman amanda at velociraptor.info
Wed Oct 31 20:37:20 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Earnie Boyd wrote:
> Quoting Cog Rusty <cog.rusty at gmail.com>:
> 
>> On 10/31/07, Amanda Bee <amanda at velociraptor.info> wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> I don't want drupal to do anything. If I set the path to "/news/" I want
>>> drupal to make a link that says <a href="/news/">Foo</a> and not <a
>>> href="/drupal//news/">Foo</a>.
>>>
>>> This is obviously some kind of rocket science like I never imagined.
>>
>> 1. If you want it to always go to http://www.example.com/news, then
>> why can't you simply use a fully qualified URL.
>>
>> 2. If you want the domain to vary, then I can't see on what condition
>> can this varying depend (except on Drupal's installation path itself).
>>
>> Hence my confusion.
>>
> 
> You seem to miss that Amanda is incorporating Drupal into an existing 
> system and she wants the existing URL to work within the Drupal menu 
> system.  The Drupal menu system is doing its magic with the URL so that 
> the relative /news/ becomes q=/news/ instead.  You also miss that 
> Amanda has more than one URL to apply her magic to so she cannot hard 
> code the host data to the reference.

Actually, Cog (is that a real name, cog rusty?) got me started. Reading
up on RewriteCond and wildcards got me as far as ...

  RewriteCond %{REQUEST_URI} ^/drupal//.*
  RewriteRule (.*) /$1 [L]

I'm halfway there. Or three quarters of the way there. Nine tenths. Now
what I've got is that the menus link to "/drupal//news/" and the page
loads the content that also appears at "/news/" sitewide. Which of
course has forced me to realize that what I really want is not URL
rewrites, but actual redirects. Still, this keeps the site intact as a
whole so it is plenty good enough.

Next up, I'm thinking I might need to get my bicycle overhauled (get it?
rusty cog? are you not doubled over laughing now? I sure am)

Thank you, effusively.

> Perhaps some php coding using 
> http://api.drupal.org/api/function/hook_link/5 could solve the problem. 
>   But a tag list references in a new block could also suffice.


> Earnie -- http://for-my-kids.com/
> -- http://give-me-an-offer.com/
> 


- --
Amanda B Hickman
(p) 917 655 2579
(s) amandabee
(a) amandahlinc
(w) http://velociraptor.info
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHKOeArxDTsWdh5zkRAqxsAKCe6pHcw/oPb6IFvXV2o08b9JwcxACffSuw
UB0cFBlho9KSHLZnQXMmXxw=
=kn0n
-----END PGP SIGNATURE-----


More information about the support mailing list