louisstephens

Members
  • Content count

    309
  • Joined

  • Last visited

Community Reputation

141 Excellent

About louisstephens

  • Rank
    Sr. Member

Profile Information

  • Gender
    Male
  • Location
    Greenville, SC

Recent Profile Visitors

2,287 profile views
  1. louisstephens

    # ----------------------------------------------------------------------------------------------- # 9. If you only want to allow HTTPS, uncomment the RewriteCond and RewriteRule lines below. # ----------------------------------------------------------------------------------------------- RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # If using an AWS load balancer, use these two lines below instead of those above: # RewriteCond %{HTTP:X-Forwarded-Proto} =http # RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  2. louisstephens

    To be honest, I dont really see the empty divs in your sreenshot. However, a foreach loop should only output the exact number of items selected, unless you have a open tag/closing tag out of place.
  3. louisstephens

    To be honest, after a lot of searching, I can't really find any clean way of doing this that isnt hacky. I know with explode you can do: $name = "John Doe"; $chunks = explode(" ", $name); echo $chunks[1]; However, I dont think you can really apply this to $pages->find() as it returns a PageArray and not a string which you would need for explode. If you have access to it, the Profields module "Textareas" allows you to have one field, but define multiple fields through it: ie first_name and last_name.
  4. louisstephens

    Thanks for the suggestion! Ill have to dive further into the module as I have only used it in a very limited fashion.
  5. So this is more or less just a question regarding best practices, and how to actually achieve this. I have an internal tool I built awhile ago that has just gotten very "trashed". The naming conventions are all out of whack due to trying to get something completed, and pages are just everywhere. The fields got really out of hand as well, but I believe I have found a much cleaner field structure with the Repeater Matrix and a few other ProFields. I decided recently to rewrite the template structure and the fields from scratch to keep everything nice and neat, but then it hit me that I would need to move all the previous data over and populate the new fields etc. The current tree looks something like: Group Title - Section A (template "section") - Category One (template "category") - Category Two (template "category") - Section B (template "section") - Category One (template "category") - Category Two (template "category") Etc etc... The structure is pretty good, and I am thinking of keeping it as it serves my purpose. However, I now have about 140 Sections with child pages that I would hopefully like to move to different templates, as well as changing the child templates/mapping data to the new fields. The only fields I need to worry about are a few textareas, text fields, options field, as well as 1 image filed. I guess my real question is, what is the best way to go about this "migration" via the api while keeping the parent/child structure. It would be ok to leave it as is and chip away at it if I were the only one using it, but unfortunately that is not the case. I guess one approach would be to copy over the entire structure and make the move to the new templates/fields. Once we have verified all the data/templates are correct, we could remove the old structure and possibly rename the new to mirror the old. However, this might just be too complicated.
  6. louisstephens

    I believe you could achieve this by "Extra Allowed Content" under the input tab for the field itself. I have mine set up with : img[*] In your source code (after you have uploaded and image to the ckeditor field), you could then simply add in class="img-fluid" and it would then retain the class. Then in you actual code for the template, just use: <?= $page->your_field_here; ?> and the content/image will be output with the correct classes to make it responsive.
  7. louisstephens

    Unfortunately, there is not enough information here to fully answer your question. It might be useful if you could provide a bit more information to your setup. Are you using any type of module like wiresmtp, or a 3rd party php library to handle emails?
  8. I havent tested this, but I did find this: https://stackoverflow.com/questions/14039638/apply-background-color-in-ckeditor-textarea
  9. louisstephens

    I have done something similar before using: $pages->addHookAfter('saved', function($event) { $page = $event->arguments[0]; // if page template = specific template, then execute desired code if($page->template->name == 'mytemplatename') { # do something here } } I just put it in the ready.php file under the "site" folder.
  10. louisstephens

    Just a heads up, I did try to install the theme, but it really did a number on the admin side. Ill have to revert back to a previous state with adminthemeui installed.
  11. louisstephens

    Oh I agree completely! In fact, I did exactly as you suggested. Where it got confusing for the enduser was a bunch of nested matrix, and if a "mistake" was made further down the line with their selection, they would have to delete a large selection and restart. However, I do need to come up with a solution that might make things a bit easier.
  12. louisstephens

    After reading your question a bit more carefully, I would give a +1 to Repeater Matrix (pro module). You could code the partials (jumbotron, testimonials, etc etc) and then allow users to add in your predefined options.. The only real "hard part" is figuring out rows/columns. I attempted earlier this year to nest multiple Matrix fields for rows, columns, and options but got really confusing for the end user. This has been the only caveat I have found.
  13. louisstephens

    +1 for Duplicator. It has saved me so much time deploying projects.
  14. louisstephens

    Thanks Macrura for the help. To be honest, I am still wrapping my head around ajax, so I completely overlooked logging the POST requests etc. As it turns out, I had a "wonderful" typo in my code, and forgot the "()" on $page->save() that was causing the issue.
  15. So I have a project where multiple pages are sending POST data to 1 single template page. All was working well (well, at least with one ajax post), but now I have hit a stumbling block. I figured the "best" way to handle the request were to use url segments and then use the following in the status page: if ($config->ajax && $input->urlSegment1 == 'add-bookmark') { // some code here } However, this doesnt seem to really work (as I assume the the request isnt being posted to /status/ but rather to /status/add-bookmark/). What is the best way to actually handle this?