0

I have a content type that includes a link field using the Link module. That content type is used to create nodes that will be displayed on a Basic Page using the Nodeblock module; I'm using them as navigation elements.

When I have a nodeblock with "about-us/careers" in the link field, when I'm on the "about-us" page the link in that node block correctly displays and takes me to "http://example.com/about-us/careers", but when I show that same nodeblock on the "about-us/careers" page the link is displayed as "node/id".

The link is being output in a custom tpl file using the l() function and the safe_value.

Has anyone else experienced this and do you know what's causing it and therefore how to fix it?

2
  • "using the l() function" - why haven't you tried simply to render a field, instead of outputting it's content? Also, please don't link to commercial sites if they are not the ones you ask about ;) and include relevant parts of code, in this case your tpl file.
    – Mołot
    Jan 4, 2014 at 8:24
  • Hahaha sorry I didn't even realize that mydomain.com was a valid site. I'm using the l() function because I'm modifying the text value for the link based on certain conditions. Seems like a bug to me. I solved it by throwing the $base_url in from if the link value is internal... Jan 5, 2014 at 3:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.