Jump to content

Guy Incognito

  • Content Count

  • Joined

  • Last visited

Community Reputation

42 Excellent

About Guy Incognito

  • Rank
    Sr. Member

Profile Information

  • Location
    Kent, UK

Recent Profile Visitors

768 profile views
  1. Interesting I hadn't considered that. I was wondering - could I just change the admin template permissions in the access tab to exclude the roles I don't want to give backend access to? Any unforeseen consequences here? ๐Ÿค”
  2. Yes sure I can make something work here thanks. Love these kind of simple approaches - I was way overthinking it!
  3. As per the title really, is it possible to set up front end editing permission on a template without granting a user access to the back end dashboard? I know I can allow editing with the API but seems to be reinventing the wheel somewhat!
  4. I have installed this module on a site that uses URL segments on the home page. I don't seem to be able to access /sitemap.xml - it just redirects back to the homepage, presumably the path is being treated as URL segment. Is this expected behaviour or do I have something set up incorrectly?
  5. Thank you - I can confirm I managed to log in too now, but had to go Incognito to get it to come back to life otherwise it just looped back to the login screen with no messaging. Presumably something to with session info related to my account as above.
  6. Thank you. I did try most of the different ways of including files. The problem wasnโ€™t with the include itself which was working fine. The include itself was running some PW selectors and dynamically populating some variables critical to the rest of the page content. Seems that with a standard include things werenโ€™t loading in the order I needed for this to work, but using an appended init file works fine ๐Ÿ˜Š
  7. After some sleep I answered this myself by prepending an _init.php file in my config with the include in ๐Ÿ˜…
  8. I'm experimenting with markup regions for the first time instead of static output. Everything's going great other than I can't work out how to include other PHP files in my _main.php file that use PW functionality. Primarily I have a script that runs some checks against user permissions and runs a few PW selector queries to set up a few useful variables for a basic web app. If I include this file into my _main.php the variables don't populate as it doesn't have access to things like the PW $pages object - presumably something to do with the load order? What's the correct way to go about this, a new module seems overkill. Is it just a case of including the file at the top of every template, or is there a smarter way?
  9. Oh sorry you got me!! I was originally going to post two threads for the slightly different (but related) issues. But shortly after posting I fixed one of them and as nobody had seen or responded to it yet (or so I thought) I edited it into one post... but you must have responded at the same time. Apologies ๐Ÿ™‚
  10. @joshua this looks like a really useful module thank you ๐Ÿ™‚. Will definitely be giving this a try on our next project.
  11. Thanks @Robin S - although, not sure if I'm being thick here ๐Ÿ˜†, but will that change anything on the specific problem of the final image's description not being updated? The rest of my loop seems to work fine, but for some reason it doesn't apply the description to the final image/iteration. Really odd.
  12. This short script loops through some images from an XML feed and pushes new ones to an image field. It all works perfectly, except for some reason the last image (only) in the loop each time doesn't receive the image description... can everyone spot why? TIA! ๐Ÿ™‚ foreach ($propertyImages as $img) { $fileName = trim($img[0]); if ( !empty($fileName) ) { $imgPath = '../property_data/'.$fileName; if(file_exists($imgPath) && !in_array(strtolower($fileName),$currentImages)) { $p->property_images->add($imgPath); $p->save(); $newImg = $p->property_images->last(); $newImg->description = $img[1]; $p->save(); } } }
  13. Ok got it - this works! $ogImg = $page->single_image->first()->httpUrl; So as you said @gebeer it's something to do with the images being stored in an array, but no idea why looping through them manually wasn't working!
  14. Yes have tried both as a method and property.
  • Create New...