Jump to content

Peter Knight

Members
  • Posts

    1,349
  • Joined

  • Last visited

  • Days Won

    5

Peter Knight last won the day on May 16 2016

Peter Knight had the most liked content!

Contact Methods

  • Website URL
    https://www.edenstudios.com

Profile Information

  • Gender
    Male
  • Location
    Dublin, Ireland.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Peter Knight's Achievements

Hero Member

Hero Member (6/6)

913

Reputation

9

Community Answers

  1. Got this to work. I needed to include this at the top of the PHP include <?php namespace ProcessWire; ?>
  2. Does anyone know if this Module works in RepeaterMatrix or what I might be doing wrong to get a Call to undefined function wireRenderFile() error? Used within the template itself (and outside Matrix), I can successfully render my file using the following <?php $myfile = $page->fieldtypeselectfile; ?> <?php echo wireRenderFile("$myfile");?> However, when I create a Matrix Repeater field called Element_Picker.php and add that same code into site/templates/fields/matrix/Element_Picker.php I get an error Fatal Error: Uncaught Error: Call to undefined function wireRenderFile() in site/templates/fields/matrix/Element_Picker.php:3 #0 wire/core/TemplateFile.php (327): require() #1 wire/core/Wire.php (414): TemplateFile->___render() #2 wire/core/WireHooks.php (951): Wire->_callMethod('___render', Array) #3 wire/core/Wire.php (485): WireHooks->runHooks(Object(TemplateFile), 'render', Array) #4 site/modules/FieldtypeRepeaterMatrix/RepeaterMatrixPage.php (284): Wire->__call('render', Array) #5 site/templates/fields/matrix.php (3): RepeaterMatrixPage->render() #6 wire/core/TemplateFile.php (32 (line 3 of site/templates/fields/matrix/Element_Picker.php) This error message was shown because: you are logged in as a Superuser. Error has been logged. Thanks. Much appreciated as always.
  3. Hi @Martijn Geerts Great Module. Thanks for contributing this to the community. I think I've found a bug using ProcessWire 3.0.184 If I specify a subfolder such as blocks/ or just blocks, I can see the list of available files in the fieldtypeselectfile dropdown. But on the frontend, I get an error as follows. I can see that the blocks subdirectory isn't being recognised. Happy-ish to just work off the main templates folder but for house-keeping purposes, I'd love to specify a sub-folder.
  4. Thanks @bernhard I've been trying this and much to my surprise, I have it working as follows. Have yet to try it within a Repeater Matrix for the moment. <?php $myfile = $page->fieldtypeselectfile; ?> <?php echo wireRenderFile("$myfile");?> I did find a bug whereby this only seems to scan files within the template folder and not a custom directory but I'll mention that on the main Module thread. Thanks.
  5. Thanks @aagd. Good idea and certainly something I'm about to explore. I used 2 examples but I'll probably at some stage end up with a lot more. My concern is about scalability here and having to create a field to associate with each file. Ideally I'd love a file select field that I can simply point at a directory.
  6. Hi Is there a field type in the Core which will allow be to select one (or more) files within the PW file system? For context... I want to create two stand-alone PHP files which contain simple HTML as follows Call-to-Action-01.php would be <h2>Call us</h2> Call-to-Action-02.php would be <h2>Email us</h2> These would be stored within the PW /templates directory (I think). I then want to use RepeaterMatrix to select one or both and output them into my template where necessary. I was then looking at the $files->render() method and have the following working <?php $string = $files->render($Call-to-Action01.php); ?> So that's a good start but now how to select ? Thanks 👍
  7. Is RockSEO an upcoming Module by the community or a paid Pro Module?
  8. @Mike Rockett I'm getting an error on an install as follows: It only affects the admin/back-end but wondered if there was a sensible way to fix? The only change I made recently to the Module was to stop logging 404 errors and possibly an upgrade of the Module too. Many thanks
  9. Hi Mike. I was having issues with a site recently where the database seemed to baloon in size (98 MB) and I tracked it down to the Jumplinks Module. I think the culprit is the 404 monitor which only displays the latest 100 but might possibly keep a record of everything? After logging into the Jumplinks admin area and clearing the 404 records, the table is back down to a few kb. Actually, my entire database is down from 103 MB to 5 MB Is there a way to prevent this instead of manually clearing the 404 recording? Assuming this is the culprit... Thanks
  10. Is there a way to output the sitemap as as sitemap.xml file?
  11. Hi @Mike Rockett Are JumpLinks to external sites generating 301 redirects? I need to redirect most of the content of a site to an eternal site and unsure if I should use JumpLinks or a HT access 301 redirect. Many thanks
  12. In MSN, we have the ability to adjust the inner template by editing this: <div class="uk-navbar-dropdown"><ul class="uk-nav uk-navbar-dropdown-nav">||</ul></div> This affects all the drop-down menus on my page (which is great). But what is you want to just target the output of a single dropdown? I have a requirement to inject just one of my drop down menus with a 'special link' (just some html) I made some progress by creating a conditional check <?php if($page->id == 1398) $txt3 = "special link"; ?> and then adjusting the drop down template to... <div class="uk-navbar-dropdown"> <ul class="uk-nav uk-navbar-dropdown-nav">|| '.$txt3.' </ul> </div> but then I realise that it injects my special link into all the drop downs and I just want to appear for the drop down of Colours. Can anyone point me in the right direction keeping in mind my basic (very) PHP skills? Thanks BTW I know @Soma is the author here of the Module but following his beautiful artwork on Instagram, I'm not sure if he's in the web dev industry anymore?
  13. Thank you Horst. I was heading down the wrong track and looking at https://processwire.com/api/ref/wire-array/remove/
  14. Hi I have a list of pages all based on the same template but I want to exclude 2 by page ID $expertises = $pages->find("template=case-type, sort=sort"); foreach ($expertises as $expertise); I know I could change their template or add an exclude checkbox to the template etc Wondering if there is a page=not(4989,9877) type of thing in the API to exclude pages by ID? I can't find anything in the API docs but think I may be searching for the wrong phrase. Thanks
×
×
  • Create New...