louisstephens

Members
  • Content count

    205
  • Joined

  • Last visited

Community Reputation

90 Excellent

About louisstephens

Profile Information

  • Gender
    Male
  • Location
    Greenville, SC

Recent Profile Visitors

1,837 profile views
  1. Hey desbest, what version of processwire are you currently using? If you are using 3.x.x, you will probably need to incorporate <?php namespace ProcessWire; ?> into your template files. However, there might be a few other things needed as this profile was introduced 5 years ago and has been removed from the Site Profiles currently in the modules directory. There is though an updated version by @dadish that updates it to v3.x.x, and it can be found here.
  2. Welcome to the forums and to processwire @Eljeff! Currently, processwire does not have ready made templates to drop in, or a marketplace for such things. However, when you install a fresh copy of processwire, you get several site profiles to use, and there is a bootstrap profile out there. One of my favorite things of processwire, is that is is very simple to get a basic site up and running. With just a few if/foreach loops and echo's, you can get a simple site going very quickly. This makes it super easy to integrate your own framework/css into the mix. @flydev has shared these videos which will help out in the start of your templating:
  3. You could create another field (ie seo_title) and then in the meta title (for that page) use: <title><?php echo $page->seo_title; ?></title> or really echo that in whatever tag you need.
  4. I have been looking up everything I can to try to find what's going wrong with this. I have a very simple form (title and file field set to multiple) that will create a new page with the name and attachments. However, it appears that I am missing something crucial as only 1 item gets uploaded to the field. Here is my code: <?php $uploadpage = new Page(); $uploadpage->template = "dashboard"; $uploadpage->parent = $pages->get("/testing/"); $uploadpage->title = $sanitizer->text($input->post->new_title); $uploadpage->save(); $uploadpage->setOutputFormatting(false); $u = new WireUpload('test_upload'); $u->setMaxFiles(6); $u->setOverwrite(false); $u->setDestinationPath($uploadpage->test_upload->path()); $u->setValidExtensions(array('jpg', 'jpeg', 'gif', 'png', 'pdf')); foreach($u->execute() as $filename) { $uploadpage->test_upload->add($filename); } $uploadpage->save(); ?> I have the max files set to 6, and have a foreach loop to add the files, but it is only uploading one. Does anyone see where I might have gone astray?
  5. I actually have done something similar on a project using the Date/Time, and at the time, a checkbox. However, I have since moved it to 2 Date/Time fields. I simply compared the two, and used an if statement to display the page content if the condition was met. This is rough, but it is similar to what I have done: <?php $startdate = $page->start_date; $expirationdate = $page->expiration_date; //you will probably need to use strtotime on these to compare. if ($startdate < $expirationdate) { //show the desired information } else ( echo "We're sorry, there are currently no promotions availabe."; ) ?> However, I guess this might not suite your needs since the page will still be visible, unless you do some checking in your navigation to show/hide the url with a conditional.
  6. Welcome to processwire davede. Unfortunately, there currently is not a marketplace or library of themes available for pw. That being said, when installing a fresh install of pw, you do get several site profiles where you can dig around in the code. I do believe there is a uikit and bootstrap (4) site profile floating around here as well. One of my favorite things about pw is with just a few if/foreach loops and echo's, you can get a simple site going very quickly. This makes it super easy to integrate your own framework/css into the mix. This actually isnt a bad read through (in regards to making a simple "theme"): https://webdesign.tutsplus.com/tutorials/how-to-develop-a-processwire-theme--cms-25692
  7. As far as I know, there is not a way for a user to create new pages strictly via a front end instance (without using the api). However, you could use the backend and allow a user to create a page (and not allow publishing), or you could create a form on the front end (After login) that would allow a user to fill it out and create a page utilizing the API.
  8. Yep, I completely forgot about using wire('page') in the _func.php . That did the trick. Thank you abdus.
  9. So maybe has already figured this out, but I am stumped. I have a field (test_field) that is set to pdfs, and I was trying to get a count of the number of pdfs in that field so I could add it to a status bubble on the front end. I tried: function testPDF() { $a = $page->test_field->count(); echo "<span class=\"bubble\">" . $a . "</span>"; } but it is returning "NULL" . I currently have 3 added to the field. I also tried putting this function in _func.php, though I need to use wire('pages'), but I only need to get the count for that specific page, so I am sort of at a loss of how to proceed.
  10. Fbg13 is right, in that you will need a working knowledge of php. However, my knowledge of php is not up to par (to some of the members here), but I am still able to code out a lot of "complex" pages. It can be as simple as getting the page title/body (very basic example. <h1><?php echo $page->title; ?></h1> <p><?php echo $page->body; ?></p> I guess what I am saying is not to get too discouraged. A simple site (with a bit of knowledge in php) can be made quite quickly. I have learned more than ever with just doing and various other forums. Also, the forums here are great to search through to find answers to your questions. Looking back, I have asked some pretty "silly" questions that now I can tackle no problem.
  11. It is very strange, on my 3.0.61 dev/testing site, I do have the repeaters showing up in the template select. I created a test_repeater for this, and as You can see, it is displaying at the bottom of the list in my screenshot. I have $config->advanced = false; (what Ryan was asking in the github issue), and to be honest I am pretty confused as to why this is showing up. Does anyone else have this occurring in a dev setup or a live? Note: test_repeater has 5 items added to it (used on 1 template, but the specials repeat has 4 items , but is being used on multiple pages (I guess where the duplication comes from).
  12. Im still trying to see if I can duplicate your issue on my end, but I do see that an issue was created in June regarding the same thing: https://github.com/processwire/processwire-issues/issues/287 However, it does not seem like Ryan could duplicate it either. Ill keep testing, though hopefully someone else will have an actual answer for you.
  13. Thanks @AndZyk! That indeed solved the image issues. On your point regarding the logo, serving a compact logo for mobile is what I hope to accomplish in the long road. I also noticed that changing the column to uk-width-1-1@m helped with the resizing on mobile as well (in terms of the column). I appreciate all the help.
  14. Perhaps someone can help me on this. I recently started poking around at uikit (I have used bootstrap and foundation previously) as I liked the admin theme and a few of the components. However, their documentation is a bit confusing and I can never get the desired results. I am sure I am doing something wrong, but I did not want to digg into v2, if things will be changing (for better or worse). I have the following: <div class="uk-section"> <div class="uk-container uk-container-large"> <div class="uk-child-width-1-1@s uk-grid-small uk-grid-match" uk-grid> <div class="uk-width-1-2"> <img src="images/logo.png" alt="" width="1183" height="167" /> </div> </div> </div> </div> <div class="uk-section"> <div class="uk-container uk-container-large"> <h3>Section</h3> <div class="uk-child-width-1-4@m uk-grid-small uk-grid-match" uk-grid> <div class="item"> <div class="uk-card uk-card-default uk-card-body"> <h3 class="uk-card-title">Default</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> </div> </div> <div class="item"> <div class="uk-card uk-card-default uk-card-body"> <h3 class="uk-card-title">Primary</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> </div> </div> <div class="item"> <div class="uk-card uk-card-default uk-card-body"> <h3 class="uk-card-title">Secondary</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> </div> </div> <div class="item"> <div class="uk-card uk-card-default uk-card-body"> <h3 class="uk-card-title">Secondary</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> </div> </div> </div> </div> </div> The cards at the bottom stack on mobile which is the desired effect. However, the logo at the top is squished and on mobile does not seem to be resizing to take on the .uk-child-width-1-1@s. Is there a way to prevent the logo from squishing, and for it to resize with the browser? I have noticed when I do <div class="uk-section"> <div class="uk-container uk-container-large"> <div class="uk-child-width-1-1@s uk-grid-small uk-grid-match" uk-grid> <div class="uk-width-1-2"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> </div> <div class="uk-width-1-2"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> </div> </div> </div> </div> that the grid also does not collapse to full width either. I am positive I have just missed something in the documentation, or how uikit is supposed to work. However, for the life of me I can not find it.
  15. Thanks everyone for the help. I got a bit turned around and was struggling with digitalocean, when I should have been interacting with runcloud as my "dashboard". Ill let everyone know how my setup turns out once I get to it this morning.