PDF assets and Fuel Link CKE plugin

edited October 2015 in Share
A user worked out, without prompting, how to upload a PDF into the appropriate asset subfolder. Hurrah. Then, wanting to use the link displayed in the Asset module listing in a Page, using the CK Editor link button, they copied that path eg pdf/somepdffile.pdf into the link address input. However, the CKE link plugin wraps the link in an asset_path() PHP expression 'as is', so the generated link is ../assets/pdf/pdf/somepdffile.pdf which of course is wrong. It seems the only correct method is to enter just the PDF filename, and no path.

What end of the process should be addressed here - the displayed link, or the parsing of the entered string in the fuel link plugin? Or, add a PDF link plugin separately that lists the PDF folder contents?

I don't know where the CKE plugin gets the asset_path() expression from, let alone write a PDF plugin. Do you have any advice on this situation? Thanks!

Comments

  • I'd normally expect the PDF file to be wrapped in {pdf_path()}.

    Yes, I agree, the current method of added PDFs is not ideal.

    In your MY_fuel_layouts.php config file you can add 'link_pdfs' 'body' => array('data'=>array('link_pdfs'=>'true'), 'label' => lang('layout_field_body'), 'type' => 'textarea', 'description' => lang('layout_field_body_description')), which will list all the PDFs along with the pages in your CKEditor Link toolbar dialog.

    It's still messy though. I have a task on my todo list to add a new CKEditor plugin that will do a FuelLink type dialog just for PDFs. I'll get to it one day...
Sign In or Register to comment.