Jump to content

Peter Knight

Members
  • Posts

    1,379
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Peter Knight

  1. <?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? Thanks
  2. @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.
  3. Thank you both. Got it working in the end with a page ID as a variable. Came back here and noticed your approaches are more efficient. @bernhard I'm not familiar with selector properties being in square brackets. Is this called Sub-selectors: selectors within selectors on the docs page?
  4. That's the correct structure. I see what you mean about Depid being a variable. I'll try that.
  5. 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
  6. 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. <?php $pages->find("template=a-person"); foreach($page->children(has_parent=/meet/) as $meet) { echo " IE Department A will only list John and Will Department B will only list Lisa and Amy I'll keep hammering away at it ...
  7. True ? whatd also be great is a module that watched a Real folder where you added your HC chunks. Anything dropped in there would auto create a matching HC in the admin.
  8. That’s very helpful. Thanks for taking time to type it all up. I really like Hannah Code but I also wish I could store my PHP in files within templates/components or such instead of having to edit and add to a HC personally it’s esaier for me to edit using sublime text etc than try to tweak a HC
  9. Thanks for the info. Can you provide an example of your repeater code and the basic Hannah code mechanism?
  10. 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. Cheers
  11. 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 ?
  12. I could go that direction if I had separate sub-pages. But these quotes are repeaters within each page. Or did I misunderstand your approach?
  13. 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. IE 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... <?php 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. Thanks
  14. 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? Thanks P
  15. 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 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 Thanks
  16. I notice on the Module settings that the username and password are displayed in plain text. I've a few admins that I wouldn't like to be able to view these. Is masking these on the roadmap or even encrypting them? Does this also mean that they're stored in the database in plain text? Thanks
  17. 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.
  18. 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.
  19. 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
  20. 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 ?
  21. Anyone using Google Maps and unhappy with their recent changes might want to explore the updated ToS from maps service, Here https://venturebeat.com/2018/08/03/here-launches-new-freemium-plan-for-developers-in-response-to-google-maps-api-changes/
  22. Thanks @Zeka Worked for me on 3.0.X and saved me applying to individual templates.
  23. This doesn't seem to work. It only applies 'active' to the active child link. On a drop down menu any page/link that is active should have it's root parent marked as active too. On my example a user has no obvious indicator of what 'section' they are on just by looking at the top navigation bar.
  24. What could it mean when latest PW is not showing in the Upgrade Module? I've reinstalled it subsequent to this screenshot bit the Dev and Stable versions are sill a few versions behind the real versions. https://www.evernote.com/l/ANK7GoqdE9lFwrWhhWTMduCUzwEpN8d694c
×
×
  • Create New...