Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Currently links, images, files, etc.

http://1.1.1.1/drupal/../<resource_name.ext>

Is it possible to do:

/../<resource_name.ext>

If the questions is not clear, just let me know. Thanks!

UPDATES:

Node could be a number of different types of content: pages, stories, etc. -- I'm only talking about pages, but it's possible it (and likely) that it the question applies to all node types. And yes, the text area called "body" on the content type "page" (basically where you insert the full text of the page) ... hope that answers your question, if not, just let me know.

RE: Types of links: Images and files, since I just figured out how to do text to link to other nodes.

share|improve this question
1  
By localize, you mean using a root-relative URL? If so, why do you need to do that? –  Lèse majesté Nov 3 '10 at 3:51
    
@Lèse majesté: Yes, local = relative = localhost, meaning not hardcode, global, etc. –  blunders Nov 3 '10 at 13:37
add comment

1 Answer

up vote 2 down vote accepted

My preferred method to insert files and images in body text is to use the combination of the Filefield, Imagefield and Insert modules. Filefield allows you to attach files to nodes in a separate field. Imagefield adds image handling to filefields. Insert allows you to insert the uploaded file or image into your body text.

A huge advantage to this method is that you store your attached files and images as separate fields. That means that you can also access the files and images from the Views module.

share|improve this answer
    
Thanks for posting, if I'm reading what you've posted correctly you're saying that it's not possible to make a resource accessible via a local/relative URL, but it is possible to load a series of modules that will allow a user to upload and display images... and have the modules handle the URL encoding in the background; meaning the URLs are rendered as hardcoded URLs when the page is called, but are stored as local/relative resources to one and only one node. Right, or no? Thanks! (Really seems odd to me that you can't just make an image a node and call it via a URL...) –  blunders Nov 3 '10 at 13:45
    
No, that's not what I'm saying. I'm just describing my own preferred setup, but there are alternatives. If you want to make every image a node, check out image and image assist modules. (see drupal.org/project/img_assist) However, when I look around in the Drupal community, I see more and more people moving away from the 'everything is a node' paradigm. Yet another option is the IMCE module (drupal.org/project/imce). If you're not convinced, just try them all out! –  marcvangend Nov 3 '10 at 19:47
    
Great, thanks for the additional options! Selecting you as the answer, cheers! –  blunders Nov 3 '10 at 20:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.