Re: Link to PDF? Yikes!

2013-02-21 Thread April DeRossett
@AD7six  Thanks...You were right...I had my path wrong.  Gosh I hate that.
Thank you to everyone for your help!

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Link to PDF? Yikes!

2013-02-21 Thread lowpass
Anything under webroot can be linked to directly. You didn't provide a
complete example path so I'm guessing that a directory within
webroot/files doesn't exist. In that case, Cake will treat the URL as
a request to a controller, hence the missing FilesController msg.

On Wed, Feb 20, 2013 at 4:15 PM, April DeRossett
 wrote:
> Okay...the end path will be variable so a route won't work.  I just noticed
> that I typed the path wrong. The location is /webroot/files/../..
>
> April DeRossett
> President
> Direct Connect Solutions
> 615.386.3946 (office)
> 615.305.7036 (mobile)
> 615.386.9510 (fax)
>
> Sent from my iPhone
>
> On Feb 20, 2013, at 8:12 AM, Jonathan Sundquist 
> wrote:
>
> Either create a route so that cake knows how to get to that folder or best
> option would be to move the files folder under webroot.
>
>
> On Wed, Feb 20, 2013 at 8:05 AM, April DeRossett 
> wrote:
>>
>> I have read, and read, but I can not figure this out.  I am hoping someone
>> will point me in the right direction.  I have .pdf resources in
>> app/files/id#/../..  To which I need to link.  How do I do this?  I keep
>> getting a missing controller. "Files". Isn't there a way to link without
>> controller and model?
>>
>> --
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to cake-php+unsubscr...@googlegroups.com.
>> To post to this group, send email to cake-php@googlegroups.com.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Link to PDF? Yikes!

2013-02-21 Thread AD7six
Assuming your files really are in app/webroot/...

On Wednesday, 20 February 2013 15:05:00 UTC+1, April DeRossett wrote:
>
> I have read, and read, but I can not figure this out.  I am hoping someone 
> will point me in the right direction.  I have .pdf resources in 
> app/files/id#/../..  To which I need to link. 


It's not clear from your example but a url fragment (#) is never sent to a 
server. so if you're using # in urls (terrible idea) you need to escape it, 
otherwise the server will only see /files/id irrespective of what's at the 
end of the url

if you're *not* using # in the url - you simply have the path wrong:

path/to/app/webroot/files/some/folder/whatever/foo.pdf
url starts here ...^

i.e. requesting example.com/files/some/folder/whatever/foo.pdf will work.

Use the Html helper or simply, the router to ensure you get the path right:

$url = Router::url('/files/some/folder/whatever/foo.pdf');

$link = $this->Html->link('A pdf', '
/files/some/folder/whatever/foo.pdf');

On Wednesday, 20 February 2013 15:05:00 UTC+1, April DeRossett wrote:
>
> Okay...the end path will be variable so a route won't work


That's what routes are for ...?

AD 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Link to PDF? Yikes!

2013-02-20 Thread Marcus James
Lets say your file is inside /webroot/file/#id/mypdf.pdf

So in your view you write something like this:-

$id = 'value of id from database';

$this->Html->link('see file here','/file/'.$id.'/mypdf.pdf');

Also ,if you are storing the name of the file in your database, you can
replace the name with another variable that holds the name of the file

$fileName = 'vale of name from database';

$this->Html->link('see file here','/file/'.$id.'/'.$fileName);

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Link to PDF? Yikes!

2013-02-20 Thread April DeRossett
Okay...the end path will be variable so a route won't work.  I just noticed 
that I typed the path wrong. The location is /webroot/files/../..

April DeRossett
President
Direct Connect Solutions
615.386.3946 (office)
615.305.7036 (mobile)
615.386.9510 (fax)

Sent from my iPhone

On Feb 20, 2013, at 8:12 AM, Jonathan Sundquist  wrote:

> Either create a route so that cake knows how to get to that folder or best 
> option would be to move the files folder under webroot.
> 
> 
> On Wed, Feb 20, 2013 at 8:05 AM, April DeRossett  
> wrote:
>> I have read, and read, but I can not figure this out.  I am hoping someone 
>> will point me in the right direction.  I have .pdf resources in 
>> app/files/id#/../..  To which I need to link.  How do I do this?  I keep 
>> getting a missing controller. "Files". Isn't there a way to link without 
>> controller and model?
>> 
>> --
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>> 
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to cake-php+unsubscr...@googlegroups.com.
>> To post to this group, send email to cake-php@googlegroups.com.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
> 
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Link to PDF? Yikes!

2013-02-20 Thread Jonathan Sundquist
Either create a route so that cake knows how to get to that folder or best
option would be to move the files folder under webroot.


On Wed, Feb 20, 2013 at 8:05 AM, April DeRossett
wrote:

> I have read, and read, but I can not figure this out.  I am hoping someone
> will point me in the right direction.  I have .pdf resources in
> app/files/id#/../..  To which I need to link.  How do I do this?  I keep
> getting a missing controller. "Files". Isn't there a way to link without
> controller and model?
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Link to PDF? Yikes!

2013-02-20 Thread April DeRossett
I have read, and read, but I can not figure this out.  I am hoping someone will 
point me in the right direction.  I have .pdf resources in app/files/id#/../..  
To which I need to link.  How do I do this?  I keep getting a missing 
controller. "Files". Isn't there a way to link without controller and model?  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.