My customer has a PDF of his products and now wants a menu item to display that file. I tried just creating an item with that file's [relative] URL and it says that the path is invalid. Drupal 6 for the moment, but will probably be going to 7 soon.
Nancy E. Wichmann, PMP (781) 697-6344 (temporary hearing difficulties make the phone a poor first contact) Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From a usability note having a PDF on a menu item might not be the best
approach. Could you have users go to a page and download the PDF so they know they are getting a PDF when they click the link. I know this is not what you asked but just my own 2 cents.
-Steve On Sep 14, 2011 8:26 AM, "Ms. Nancy Wichmann" nan_wich@bellsouth.net wrote:
My customer has a PDF of his products and now wants a menu item to display
that file. I tried just creating an item with that file's [relative] URL and it says that the path is invalid. Drupal 6 for the moment, but will probably be going to 7 soon.
Nancy E. Wichmann, PMP (781) 697-6344 (temporary hearing difficulties make the phone a poor first contact)
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L.
King, Jr.
I hope to eventually make the content of the PDF a real page, but for the moment cannot. It is actually important content listing the product lines the customer sells. Currently, it is a file attachment to the front page, but he'd like it moved to the site menu, and I agree that would be nice.
Yes, I could create a page for the menu to go to, but the PDF would have to display automatically as it does when one click on the attachment link now.
Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: Steve Kessler
From a usability note having a PDF on a menu item might not be the best approach. Could you have users go to a page and download the PDF so they know they are getting a PDF when they click the link. I know this is not what you asked but just my own 2 cents. -Steve
Use a full URL such as http://www.example.com/sites/default/files/filename.pdf instead of /sites/default/files/filename.pdf.
Ms. Nancy Wichmann wrote:
My customer has a PDF of his products and now wants a menu item to display that file. I tried just creating an item with that file's [relative] URL and it says that the path is invalid. Drupal 6 for the moment, but will probably be going to 7 soon. /*Nancy E. Wichmann, PMP*/ (781) 697-6344 (temporary hearing difficulties make the phone a poor first contact) Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
I did something like that a month ago and it worked if I used an absolute URL. I'm still debating if that was a great idea since you can't do target="_blank" to open a new window/tab.
Gregg Marshall
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Ms. Nancy Wichmann Sent: Wednesday, September 14, 2011 8:26 AM To: support drupal Subject: [support] PDF as a menu item
My customer has a PDF of his products and now wants a menu item to display that file. I tried just creating an item with that file's [relative] URL and it says that the path is invalid. Drupal 6 for the moment, but will probably be going to 7 soon.
Nancy E. Wichmann, PMP
(781) 697-6344
(temporary hearing difficulties make the phone a poor first contact)
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
I don't care about a new window. My issue currently is that I am moving the site to a new host at the same time as updating Drupal, so the site URL is changing to the new temporary name, then to the permanent name, plus I do development on my PC. A relative URL would be much easier to deal with.
Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: Gregg Marshall
I did something like that a month ago and it worked if I used an absolute URL. I’m still debating if that was a great idea since you can’t do target=”_blank” to open a new window/tab.
On Wed, 14 Sep 2011 10:28:22 -0700 (PDT) "Ms. Nancy Wichmann" nan_wich@bellsouth.net wrote:
I don't care about a new window. My issue currently is that I am moving the site to a new host at the same time as updating Drupal, so the site URL is changing to the new temporary name, then to the permanent name, plus I do development on my PC. A relative URL would be much easier to deal with.
Can you create a hook_init or maybe hook_boot implementation and use drupal_goto to redirect the URL? D7 has the sites.php possibility which maps your development as if it were production so that the URL stored in the DB contains the production URI.
-- Earnie
Yeah, I'm not a fan of the D6 menu item validation, but that's the only workaround short of making a fake router item in hook_menu.
-Mike
Ms. Nancy Wichmann wrote:
I don't care about a new window. My issue currently is that I am moving the site to a new host at the same time as updating Drupal, so the site URL is changing to the new temporary name, then to the permanent name, plus I do development on my PC. A relative URL would be much easier to deal with. /*Nancy*/ Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
------------------------------------------------------------------------ *From:* Gregg Marshall I did something like that a month ago and it worked if I used an absolute URL. I’m still debating if that was a great idea since you can’t do target=”_blank” to open a new window/tab.