Jump to content

Peter Knight

Members
  • Posts

    1,368
  • 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)

919

Reputation

9

Community Answers

  1. Hi @wbmnfktr PagePathHistory only works when a pagesURL changes to something new. In this instance, I was looking to redirect to a completely new page. I never noticed the options under the What other URLs redirect... section but they might be useful. Thanks
  2. Thanks BitPoet. I had that setup but wasn't sure it was using a 301 redirect method for SEO. I also have a nice page created via ListerPro which lists all the redirects I have made. Handy for an at-a-glance view etc
  3. I've been looking at various Redirect Modules and I don't think my current requirement is possible with any of them. I want to enter a PageID (my source page) and create a 301 redirect to a different URL (destination). Normally you might do this in the htaccess file with page paths but I'd rather do something within PW itself. Jumplinks comes close to supporting this but doesn't support page IDs. The reason I need page IDs to be specified in the source and destination is that my client often updates the page path for SEO experiments etc. If I were to use page Paths as the source and destination, they might stop working.
  4. TinyMCE Module looks great. One item I can't see is the ability to group related toolbar icons with a pipe. The official docs on TinyMCE mention to use a pipe but I can't see how to apply it to the Toolbar settings. Interestingly, if you manually type a pipe, it does add it to the Toolbar but only accepts a single one. Tin
  5. I see PostMarkApp are moving from an email credit based system to a subscription service. I'm hoping to move and was wondering which SMTP services people generally use that works well with ProcessWire?
  6. Hi @Mike Rockett My SchemaVersion is set to 4 {"schemaVersion":4,"wildcardCleaning":"fullClean","enhancedWildcardCleaning":"","legacyDomain":"","statusCodes":"200 301 302","enable404Monitor":"","moduleDebug":"","redirectsImported":true,"moduleDisable":"","_schemaVersion":2}
  7. Hi I have a little script that ouputs a default hero image if an image isn't set on the page. All works great (see below). I've realised I want to add an image Crop to one or both of these but when I add a Croppabelmage to the page specific image, I get an error. And I get this error even if no image is set. I understand what's happening. It's looking for getCrop even though there's no image in the field. But how to side-step it or do a proper check in this instance? <?php // Set var for the Hero / Masthead background image // A - The default image $image_default = $pages->get(1034)->Hero_Photo_Default->url; // or B - The specific page image $image_hero = $page->Hero_Photo->url; ?> <!-- START: Masthead --> <div class="uk-section-default uk-margin-large-bottom "> <?php if (count($image_hero)){ echo" <div class='uk-section uk-section-xlarge pk-section-masthead uk-light uk-background-cover' style='background-image: url({$image_hero})'> ";} else {echo" <div class='uk-section uk-section-xlarge pk-section-masthead uk-light uk-background-cover' style='background-image: url({$image_default})'> ";} ?> <div class="uk-container"> <!-- <h1><?=$page->title?></h1> ---> </div> </div> </div> <!-- END: Masthead -->
  8. You could try sending the emails via PostMark It's easy to integrate with WireMail SMTP, credits are cheap and it'll give you a dashboard on amounts of emails sent/bounced etc
  9. @horstI discovered what was happening here. If a crop has a template name it won't appear in a repeater staff-square,300,300,team-detail (works) staff-square,300,300 (not working) I don't have a fix for it other than to create a duplicate crop setting without a template name.
  10. Should Croppable Image 3 work with Image fields in Repeater Matrix I have a regular field called Images which correctly displays my 3 Croppable Image options. When the same Images field is added to a Repeater Matrix field, only a single Croppable Image option will display. You can see it in effect on the attached. The image field at the top is in the repeater. To test it further, I added a different image field to the Repeater, and again only see a single Croppable Image option. Can anyone confirm if this is a bug? Using Croppable Image 1.2.0 Processwire 3.0.200 Repeater Matrix 0.0.8 Thanks
  11. Thanks everyone. This works great. I thought I'd have to make something much more complex. <?php echo "<a href='" . ($page->prev("template=staff-detail")->path ?: $page->siblings("template=staff-detail")->last->path)."'><i class='fas fa-arrow-left'></i></a>"; echo "<a href='" . ($page->next("template=staff-detail")->path ?: $page->siblings("template=staff-detail")->first->path) . "'><i class='fas fa-arrow-right'></i></a>"; ?> The colon in the two echo statements seems to be some kind of shorthand for if/else. I hadn't seen it before so thanks for the tip. ?
  12. There will probably only be 10 siblings so OK if you're approaching from a performance point of view
  13. Hi I have series of staff pages and each page has a back and forward arrow to allow you to jump to the previous or next person Staff overview Staff 1 (template=staff-detail) Staff 2 (template=staff-detail) Staff 3 (template=staff-detail) Staff 4 (template=staff-detail) I had it all working as follows <!-- START: Next and Back for staff --> <?php if($page->prev("template=staff-detail")->id) { echo "<a href='{$page->prev->path}'><i class='fas fa-arrow-left'></i></a>"; } ?> <?php if($page->next("template=staff-detail")->id) { echo "<a href='{$page->next->path}'><i class='fas fa-arrow-right'></i></a>"; } ?> <!-- END: Next and Back for staff --> However, I now want to change the next and back arrows to infinitely loop through siblings. IE if you get to Staff 4 and click next arrow, you get to Staff 1 if you get to Staff 1 and click previous arrow, you get to Staff 4 I couldn't find anything in the docs which allows for some kind of infinite loop? Can anyone guide me on how to approach this? Many thanks P
  14. Got this to work. I needed to include this at the top of the PHP include <?php namespace ProcessWire; ?>
  15. 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.
×
×
  • Create New...