gregory Posted May 7, 2019 Share Posted May 7, 2019 Hi everyone. I can't see the PDF uploaded via a field called "pdf". I get a url like this: http://localhost:8888/mywebsite/site/assets/files/1129/test.pdf%EF%BB%BF%EF%BB%BF Could anyone help me? Thank you. <?php foreach($page->case_studies as $item) { if($item->type == 'contenuto') { echo " <a class='btn btn-primary btn-sm' target='blank' href='{$item->pdf->first()->url}' role='button'>Download</a> "; } } ?> Link to comment Share on other sites More sharing options...
Gideon So Posted May 8, 2019 Share Posted May 8, 2019 Hi @gregory, What is the field type of "type"?? Please provide more info about your template and field settings. Gideon 1 Link to comment Share on other sites More sharing options...
gregory Posted May 8, 2019 Author Share Posted May 8, 2019 1 hour ago, Gideon So said: Hi @gregory, What is the field type of "type"?? Please provide more info about your template and field settings. Gideon Hi @Gideon So, the field type (named pdf) is "file". Link to comment Share on other sites More sharing options...
Gideon So Posted May 8, 2019 Share Posted May 8, 2019 Hi @gregory, Is "case_studies" is a repeater or repeater matrix field?? Gideon Link to comment Share on other sites More sharing options...
gregory Posted May 8, 2019 Author Share Posted May 8, 2019 Hi @Gideon So, "case_studies" is a repeater matrix field. Link to comment Share on other sites More sharing options...
Gideon So Posted May 9, 2019 Share Posted May 9, 2019 Hi @gregory, Can you tell me more about your template settings?? Are you using the pro module: repeater matrix?? https://processwire.com/store/pro-fields/repeater-matrix/ Gideon Link to comment Share on other sites More sharing options...
gregory Posted May 9, 2019 Author Share Posted May 9, 2019 Hi @Gideon So, I'm using pro module "Repeater Matrix". I enclose a series of screenshots regarding the template. Thanks for your help. Link to comment Share on other sites More sharing options...
dragan Posted May 9, 2019 Share Posted May 9, 2019 @gregory Please don't post the same question twice. You asked the same question here as well... 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now