Search the Community
Showing results for tags 'class'.
-
I've been trying to make a carousel with a repeater field that has an "active" class on the first div. I found a similar thread here but still can't get it to work. Most likely me having a dumb moment Here's my code: <div class="carousel slide <?=$page->position?>"> <h4><?=$page->heading?></h4> <!-- Carousel items --> <div class="carousel-inner"> <?php $output = ''; $class = 'item'; foreach($page->testimonials as $testimonial) { $status = ''; if ($testimonial === $page->testimonials->first()) $status .= ' active'; $class .= $status; $output .= "<div class='{$class}'> <img class='quotes' src='{$config->urls->templates}assets/img/quotes.png'> <p>{$testimonial->body}</p> <h6>{$testimonial->person_name}</h6> </div>"; } echo $output; ?> </div> </div> Any ideas where I'm going wrong?
-
Is it possible in the ProcessPageEditLink to define multiple classes as a group. I've tried to add more the one class to a line but this breaks things. Only single classes on a line seem to work. Using a css framework like Bootstrap it would be good to be able to create a class check box for example for the combined classes: btn btn-success btn-sm.
-
I'm trying to use "PHPMailerAutoload" class with Processwire. When I include class "include_once("./PHPMailerAutoload.php");" and call it in my code "$mail = new PHPMailer();" i get an error: <p style='background:crimson;color:white;padding:0.5em;font-family:sans-serif;'><b>Error: Class 'ProcessWire\PHPMailer' not found (line 24 of /Applications/MAMP/htdocs/vm-pw-react/server/site/templates/contact.php) </b><br /><br /><small>This error message was shown because: you are logged in as a Superuser. Error has been logged. </small></p> How do I load and use the class?
-
I am trying to figure out how to add a class to an image. The image would be uploaded into the image field on a page and then placed into the "body text" of the page (ckeditor). I dont' see any place to add class tags to an image. Am I missing it somewhere? Module not installed correctly?
-
Hi, I'm developing mailbox and I wanna rather use single class then making pages. Here is the plan (or I think that its a good plan): - I have mailbox.php template and mailbox page - when user click on mailbox, on sidebar he have options to write/read massages to and from ppl Instead of making these pages, and to prevent "ugly URLs" I wanna offer user to call write msg like: http://www.domain.com/mailbox/?actionType=newMail. Also, I think that this will be useful for some other stuff which I wanna add to my project. I'm not skilful but wanna learn stuff. Cheers
-
Hello there! I have a question regarding the "renderNav" function used in the ‘intermediate’ site-profile. I have a multi-level menu system going by using the renderNav function, and I’d like to extend the default "renderNav" function to also mark all the parents of any given page with "current". I think I have to modify this line from the "renderNav" function: $out .= $item->id == wire('page')->id ? "<li class='current'>" : "<li>"; … specifically adding something along the lines of foreach parent of the itemid "<li class='current'>" else "<li>", but is there a neat way of putting that into the existing line? Or how would you do it? Thanks!
-
If I upload an image to a multiple images field, then add the image to the body field of the same page and select No alignment, the following class is assigned to the image ("No Alignment"): <p><img class="No Alignment" src="/site/assets/files/1001/image.png" alt="Example" /></p> This seems like a bug since it registers as two separate classes ("No" and "Alignment"). Can this be changed to a single (lowercase) class that doesn't include a space (or not included altogether, since it assumes the image is inline)?