Jump to content

Peter Knight

  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by Peter Knight

  1. Hi

    I have a page reference field which are a series of checkboxes in the back end

    • Web Design
    • Web Development
    • Marketing
    • Administration

    In my template I was previously listing only 1 key skill at a time but now I need to output each checked item separated by a comma


    Marketing, Administration

    This does work but echoes 

    Marketing, Administration,

                            ($staff->skills as $item){
                            echo "{$item->title},";}

    How would I keep the comma from appearing at the end of the last item?


  2. Hi Horst

    Possible bug...

    When I'm in the popup window which displays the crop preview, there's a sharpening dropdown. If I select None as the sharpening value, the next screen (the Save screen) lists the sharpening as Soft.

    It also does this when I set the sharpening to Strong. I haven't checked the others (Medium, Hard etc)

    ProcessWire: 3.0.119
    CroppableImage3: Latest

  3. 1 hour ago, horst said:

    @Peter Knight why do you cannot sort the pages manually, or let the client sort them manually?

    I can't sort them manually because the order is used in other layout components across the site.

    Technically I could build an extra kind of sortable page list but I also want to keep this really simple for a client who will be maintaining the site.


    • Like 1
  4. <?php 
    $Cats=$pages->find("parent=1086, id!=$page, sort=sort"); 
    foreach($Cats as $Cat) {
    echo "

    I have a selector that pulls in 4 child pages of a parent and the order is set to reflect the order of the tree.

    My client has asked that instead of

    Cat 1 | Cat 2 | Cat 3 | Cat 4

    we instead display

    Cat 4 | Cat 1 | Cat 2 | Cat 3 

    However, I can't change the sort order in the tree.

    Can anyone guide me on the correct approach here?



  5. @bernhard No problems here

    Mac OSX and Chrome 70.0

    I sometimes get caught out by the behaviour of the tab key but just noticed why and not sure it's a bug. Pressing tab after an @name puts the focus on the 'Submit Reply' button and away from the text field. I just noticed because on Mac/Chrome the Submit Reply button gets an active colour. 

  6. Just now, bernhard said:

    DepId would be a variable of course. Listing all persons would be as easy as just "template=person"

    But maybe you have a different template setup. I thought departments have template dep and meet have template persons and persons have template person.

    Is it different?


    That's the correct structure.

    I see what you mean about Depid being a variable. I'll try that.


  7. I can't use 

    has_parent=id because I need my output to work for 2 different pages

    Essentially I want to do this...

    • Get any child pages within a folder called "meet"

    Both Department A and Department B have their own "meet" folder and must only list the contents of their own meet folder


  8. I have a structure as follows

    Department A
    - meet 
     -- John
     -- Will

    Department B
    - meet
     -- Lisa
     -- Amy

    I want to give Department A and B the same template with a general selector that will list only the people in its child 'meet' folder.

    Normally I'd just specify a parent id but because both Departments need to list their people, I am looking to list by a path.

    foreach($page->children(has_parent=/meet/) as $meet) {
    echo "


    Department A will only list John and Will

    Department B will only list Lisa and Amy

    I'll keep hammering away at it ...





  9.  I have a template where a slider widget appears within my clients body tag. It’s never in the same place twice and client wants freedom to add and remove it as they need  

    And I wondered if I am up to date on my options in PW to achieve this..

    A) use the pro fields matrix field type to allow client to add the premade slider. They can then follow this by adding another body/content field. 

    B) make the slider a Hannah code chunk. Client can then add manually or use the Hannah code plugin to insert. 

    Are they my 2 main options ? Sometimes the latest methods mentioned in the recent blog posts don’t really make sense to me until I really need a new way to do things and someone says “hey checkout markup regions” etc. there’s possibilly newer ways to execute this. 


  10. Thank you!

    So straightforward when you see how.

    I got up at 5AM this morning to work on this project and thought I'd get a good 12 hours at it. Instead, I had computer and internet problems all day. At least I can wake up tomorrow AM (not at 5AM though) knowing I have this fixed 🙂

  11. Hi guys

    A few pages on my site are required to output a random quote from a bunch of 5 which are associated with that page.


    About has 5 quotes
    Home has 5 quotes
    Company has 5 quotes

    Normally I'd just make a few child pages for each parent and give it it's own template. Using a selector to do that would be easy.

    However, I've decided to go down the route of adding each pages 5 quotes to a repeater field.

    I can output ALL the pages quotes using this...

    foreach($page->one_liner_group as $one) {
    echo "{$one->one_liner}<p>"; 

    but I'm not so sure where to add (limit=1) and getRandom when using repeaters within a page.



  12. Hi guys

    I'm building a homepage with a full screen, responsive video background.

    The client wants the video file to be hosted on their own server and I wondered if instead it should be hosted on YouTube instead.

    I'm thinking that YouTube will have much better bandwidth detection etc and handle the playback more intelligently than simply throwing an MP4 on a server.

    If anyone has any experience with both scenarios, can they confirm or deny?




  13. Hi 

    One more question

    I have 2 FTP applications here successfully connecting to a destination server over FTPS SSL/TLS 


    When I add the exact same credentials to Duplicator, I get the following


    2018-09-06 15:00:43:  - job finished in 110.8802sec
    2018-09-06 15:00:43:  [FTP] error: cannot upload file <2018-09-06_14-58-52-www.domain.co.uk.package.zip> on server.
    2018-09-06 14:59:40:  FTP: starting upload of /home/sites/domain.co.uk/public_html/site/assets/backups/2018-09-06_14-58-52-www.domain.co.uk.package.zip
    2018-09-06 14:59:40:  FTP: directory listing of Backups successfull.
    2018-09-06 14:59:40:  FTP: retrieving directory listing of Backups...
    2018-09-06 14:59:40:  FTP: directory listing of Sharey01 successfull.
    2018-09-06 14:59:40:  FTP: retrieving directory listing of Sharey01...
    2018-09-06 14:59:39:  FTP: logged in.
    2018-09-06 14:59:39:  FTP: connection established.
    2018-09-06 14:59:39:  FTP: connecting to myserver.com:21...
    2018-09-06 14:59:39:  - package built successfully in 46.558444sec

    So it looks like Duplicator is successfully building the package, logging in to the server and listing the directory files. It only fails to actually upload the ZIP

    There are no size restrictions on the server and there are I have disconnected the other FTP apps to ensure that's not the issue either.

    Any ideas why the upload might fail? This only happens on TLS/SSL and not under 'regular' unencrypted FTP



    • Like 1
  14. On 2/12/2016 at 9:45 AM, iNoize said:

    1and1 check your htaccess 

    I know this problem there 

      # RewriteBase /
      # RewriteBase /pw/
      # RewriteBase /~user/
    change to 
        RewriteBase /
      # RewriteBase /pw/
      # RewriteBase /~user/

    Worked for me too. Thanks for the tip.

    Interestingly if you think it'd the database connection error, please try the above first.

    I couldn't connect to the database remotely (since learnt this is disabled) or via their own php test scripts. Was convinced it was database until the above worked.


  15. 10 minutes ago, LostKobrakai said:

    A php setting can never override what htaccess does. PHP is not even started when the htaccess file is read/executed.

    So the config setting ($config->noHTTPS = true; ) is ineffective if there’s a htacess setting of always use https ? 

    That seems a bit odd as any site running Http would probably have this htaccess directive enabled for SEO reasons. 

  16. Thanks, Ryan for the https config setting.

    Few Qs if you've got time

    • Does this need to be manually included in a config? I just updated to  3.0.110 © 2018 and noticed it's not there (possibly is not meant to be).
    • Even after including this, I notice the HTTPS setting in the htaccess file over-rides this. it's be great to have a config that over-rides both the HTTPS and www V non www settings too


  17. The current PW homepage has a few screenshots of the admin featuring the old UI.

    @ryan For what it's worth and because I had 5 minutes I remade it in the new UIKit theme. It's just a screengrab - nothing fancy.

    Might not even be the right size but it's been annoying me irrationally for months 🙂



    • Like 5
  • Create New...