Jump to content

louisstephens

Members
  • Content Count

    484
  • Joined

  • Last visited

Everything posted by louisstephens

  1. In your template, you should be able to do echo $page->your_file_field->name; This is a good cheatsheet regarding the file field as well: https://cheatsheet.processwire.com/files/file-properties/ I apologize, I kinda missed that you were not going through a file field but were uploading to a directory. This might be a bit better approach for you then:
  2. I havent really dealt with webp yet, but have you looked at the TextformatterWebpImages text formatter that Ryan created? Apparently it converts jpg/png image tags to use WEBP.
  3. You could also look into implementing Dropzone.js on the frontend and pass the files via ajax to a function that would loop through the files and create pages for them. It has been awhile since I last did it (over a year) and I would need to hunt down the code, but it wasn't too much of a pain to get sorted. However, Media Manager is a solid option in the backend.
  4. If you are using the Select Options fieldtype, I believe all you have to do is: <?php echo $page->your_field->title; ?> // will get "Mr/Ms"
  5. Just curious, where are you using https vs http? I have had issues with the CORS policy when pulling in https to http (or vice versa).
  6. I have not really had to make a site from the ground up in quite a bit as I have been mainly focused on internal apps using processwire. However, I have now been tasked with creating a site and I was quite excited. I started down the path of using bulma as it seemed like a good fit. I got the whole site coded statically and was not moving on to porting it over to processwire. I pretty much have the the whole site figured out save for tackling the navbar. My current navbar is set up as so: <section id="nav"> <nav class="navbar" role="navigation" aria-label="main navigation"> <div class="navbar-brand"> <a class="navbar-item is-size-3 has-text-primary" href="#">Logo goes here</a> <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample"> <span aria-hidden="true"></span> <span aria-hidden="true"></span> <span aria-hidden="true"></span> </a> </div> <div id="navbarBasicExample" class="navbar-menu"> <div class="navbar-end"> <a class="navbar-item">Home</a> <div class="navbar-item has-dropdown is-hoverable"> <a class="navbar-link">Services</a> <div class="navbar-dropdown"> <a class="navbar-item">Subpage</a> <a class="navbar-item">Subpage</a> <a class="navbar-item">Subpage</a> <a class="navbar-item">Subpage</a> </div> </div> <a class="navbar-item">Gallery</a> <a class="navbar-item">Contact Us</a> </div> </div> </nav> </section> I guess my question is how would you go about setting this up in processwire? All pages will obviously be subpages of Home with the following structure Home --Services ----Subpage ----Subpage ----Subpage ----Subpage --Gallery --Contact Us
  7. Not to keep a thread going, but will this eventually become available in the modules directory? I really like the approach you have taken!
  8. Not sure about an app that behaves like laragon for the ipad. However, I do know there are many web based IDEs like Cloud9 (only tested it a few times). To connect to to your dev servers, you could follow this post.
  9. Hey Greg, First of all, welcome to the forums! Quick question, is your images field set to Automatic (single item or null when max...) ? I just tested with an image field in my template and after clicking "choose file", shift clicking allows me to select/upload multiple files.
  10. I assume based on your code above, that templateName is being used by all Page_Name_Examples?
  11. Sorry that this isn't really an answer to your question, but I have been contemplating this idea a lot over the past few weeks. I have played around with using a page reference field that chose from a page labeled "Forms" so the user could simply select what form elements they wanted to use. However, this got a bit messy as they constantly wanted something different and I would have to make special inputs/labels just for them. It really just became a pain in the backside for myself to have to constantly update the selections. I guess my big hurdle is the form processing part, as each form could be different, I don't really know how to dynamically choose the form elements to send off/process. I apologize if I appear to be piggybacking off of your question, but I think the 2 go hand in hand.
  12. I do see that processwire does have vex . There is a a section on "including vex in your project" that might be helpful to you. However, to my knowledge there are no true "built-in" frontend modules for modals. The great thing (in a lot of people's eyes) is that processwire allows you to use whatever you want in the frontend (be it frameworks, jquery, etc etc). Are you currently using any css framework on you project like uikit/bootstrap/foundation? A lot of these have built in modals that you you include in your template.
  13. As far as a modal plugin, I would check out izimodal or jquery modal (there are hundreds out there and tbh I am forgetting one I believe a member here created that I love 😞 ). You could create a page named notifications with your image field and then pull that information directly into your homepage (in whatever markup you need for the modal). ** Noel Boss made featherlight.js
  14. Just wanted to put it on everyone's radar that VueMastery is having a free weekend starting today at (12 ET). All videos in every course are free to watch until Sunday at midnight. Cheers!
  15. Have you tried looking into Repeaters/Repeater Matrixes? A user can add many repeater items, but the fields defined within are set by the admin (or an account with the correct permissions).
  16. Hey Kei, Have you tried the skyscrapers profile by @dadish that can be found here. With a clean install of processwire, you can drop the profile in and proceed like you are setting up a new instance with the profile selected.
  17. Thanks, I appreciate the help! I was thinking it was with ProcessWire and not with the module (thought it was best to keep this under the thread in one place). I wont pretend like I understand my "fix", but I did get it working by using "img" => $offer->test_image->first->httpUrl,
  18. I have been using this module for a bit now and I absolutely love it. However, I have hit a brick wall as of late when it comes to getting the path to an image. In my function getClient(), I have the following: array_push($response->offer, [ "client" => $offer->parent->parent->name, "id" => $offer->id, "name" => $offer->name, "title" => $offer->title, "img" => $offer->test_image->httpUrl, "body" => $offer->body, ]); The image field is currently set to single value, but when I go to my endpoint, "img" is always null. When I change httpUrl to url, it only produces "img":"\/site\/assets\/files\/1019\/" For the life of me I can not find what I am doing wrong. I checked the folder 1019 under files and my image is currently there. Any help on the matter would be appreciated
  19. Ah, I did not have extra allowed content enabled, but it was a bit confusing for me as I had to add it to the toolbar and the icon appeared to be exactly like the current "url" icon.
  20. Correct me if I am wrong, but I don't think there is an "easy" way to change the icon itself, unless you went with custom js to find the icon and switch out the class names (font awesome) to something you desired. The only other option I see is to delve into custom theme building. So in your admin.php file (site/templates), add the following lines above the required controller: $modules->get('JqueryCore'); $config->scripts->add($config->urls->templates . "scripts/your-js-file.js"); Next, in your custom javascript file (which I would just put in your scripts folder), you could do something like: $(document).ready(function () { $('.uk-breadcrumb > li > a.pw-panel > i').removeClass('fa-tree').addClass('fa-telegram') }); In the above code, it will change it to the telegram icon. Simply change out the icon to any fontawesome 4 (I believe) icon you wish. The only issue with this is you will briefly see the original tree icon until the document is ready. I could not get it working without the document.ready function. Perhaps someone knows a way around this.
  21. The easiest way to change the logo is by going to (once logged in) Modules -> Core -> AdminThemeUiKit . You will see a section labeled Masthead + navigation. You should then be able to upload a new logo for the backend through the field provided. As far as changing colors of the header, the easiest approach might be to follow what Jonathan Lahijani said here:
  22. From the first picture you posted, if you click on "Bookmarks", you can select Pages from the tree to be the parent(s). Then, from there, you can go to "Add New >" and select the parent you want to add a new page to. From my understanding, this is a great shortcut feature if you are constantly going back and forth to the tree (though please correct me if I am wrong)
  23. I have not truly vetted the plugin, but there is this official plugin via CKEditor. It let me select from various protocols and has an "other" selection. I was able to successfully use the file:// protocol inside the href without it getting stripped.
  24. I do the same as wbmnfktr. I also include a github action that auto ftp/pushes the updated files to a directory on my server that can be found here: https://github.com/SamKirkland/FTP-Deploy-Action
  25. Not sure if this will suit your needs, but in javascript (jquery) you could do: $('h2').each(function() { var $element = $(this); $element.html($element.html().replace(/^(\w+)/, '<span>$1</span>')); });
×
×
  • Create New...