Jump to content

Search the Community

Showing results for tags 'bootstrap'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 34 results

  1. Hey, I am very new to processwire and bootstrap. I have a field (text area) and there I want to be able to insert an image which is responsive. I tryed it with Source but in the end the page doesn't seem to like it when I insert in Source the following code <img src="<?php echo $homepage->content_img->url; ?>" class="img-fluid" alt="Responsive image"> What can I do to make it possible to insert reponsive images in a text area? Thank you in advance. Marcel
  2. I have one central website, with membership registration and content etc., and then several related websites with their own URL/domains, each on Processwire, all on the same server. I would like to access the database of the central website from the sister websites. How would I do that? You can't bootstrap one PW installation into another. You can include template parts from one in the other by just using the server path, but whatever you try to get/post just comes/goes to the database of the site you are on. Could you switch databases by including the config.php from another PW installation somewhere? What is the correct, secure way to do this?
  3. Hello again! Unfortunately I came across another problem. I have a "regular" ProcessWire setup and want to create a separate php script. That script should be executed by a cron job and is bootstrapped with my PW setup. Main goal is to send mails which are stored in a email field. My problem: I want to access a specific field from a template where only specific users have access to. Right now, the cron job is executed as "guest", of course. How can I bypass this restriction, so that I have access to that specific field (it's only one email field)? Does it make sense to set current user via api? Hope you can help me out there. Cheers, Andreas
  4. I am using ProcessWire as the back-end to manage contents on multiple sites (I call them "sub-domains"). I use ProcessWire as an editing system and database only. The ProcessWire templating system is not in use. I want to use ProcessWire's API and in particular the Include & Bootstrap method to output contents -- pretty much in the same way you do, if contents is stored in a MySQL database and output in PHP files that use PDO to load data. The issue is that I cannot get ProcessWire to fully work on each of the "sub-domains". https://processwire.com/api/include/ says: > You can do anything with ProcessWire's API that you can do from a template, > so all of this still applies, as does everything in the developer API. How can I get access to variables such as $input when using Include & Bootstrap? I tried these: $wire->pages->get("/foo/bar/"); echo "Segment1: " . $wire->input->urlSegment1; # Returns null $wire->pages->get("/foo/bar/"); echo "Segment1: " . $wire->input()->urlSegment1; # Internal Server Error $p = $wire->pages->get("/foo/bar/"); echo "Segment1: " . $p->input->urlSegment1; # Returns null $p = $wire->pages->get("/foo/bar/"); echo "Segment1: " . $p->input()->urlSegment1; # Returns null @ryan Can the API Variables documentation be updated with a section / an example that explain how to use "Include & Bootstrap" for each variable (since this is a really strong feature in ProcessWire)? $page $pages - Example: $homepage = $wire->pages->get("/"); $input $sanitizer $session $fields $user $log $templates $config
  5. Hello all! I think this may require writing a function, which I'm not too good at... I have a primary navigation and secondary navigation, each with multiple nav-items. When a user visits a child or grand-child of a nav-item on the primary navigation, the parent nav-item retains its "active" class - no problem. The issue: When a user visits the child or grand-child of a nav-item on the secondary navigation, the nav-item on the secondary navigation not retain its "active" class. It only has an active-class when the user is on the landing page of the nav-item. Bootstrap automatically gives the "dropdown sublevel-menu" (secondary nav) an active class when the user is on the landing page of the nav-item, but if the user visits children of the nav-item, the active-class disappears. The primary nav-items retain the "dropdown active" even when their children are active. I'd appreciate any help with this head-banger! Thanks
  6. Hi Guys I am trying to save Pages with the API from the root Folder in a file named refreshIndex.php. The code looks like this: $root = "/path/to/root"; include($root . "index.php"); //$doctors = wire('pages')->find("template=doctors"); $jobs = wire('pages')->find("template=jobs"); //$news = wire('pages')->find("template=news"); //$specialities = wire('pages')->find("template=specialities-clinics"); //$events = wire('pages')->find("template=signup-form-formbuilder"); //$dbpages = wire('pages')->find("template=doctors|specialities-clinics|news|signup-form-formbuilder|jobs"); //$allpages = wire('pages')->get(27200)->find(""); foreach ($jobs as $stpage) { $stpage->save(); } Now at the moment I am trying to save Job Pages. They are 2 job pages right now. It saves 1 of them and at the 2 one I get an Error like this: Error: Uncaught WirePermissionException: Page '/de/jobs/test-job_ge/' is not currently viewable. in /pathtoroot/wire/modules/PageRender.module:319 They are both using the same template with the same permissions respectively they are visible (guest user is viewable). And also the languages of the page are all active inside page settings. Somehow my Hook is responsible for this. The hook is the reason for my Script above. I am trying to update the index field for my site search. The hooks works fine when I am saving the pages from the backend interface, but I can't save all pages from the backend since they are over 1500 pages I need to save. $this->addHookBefore('Pages::saveReady', $this, 'hookIndexingBefore'); protected function hookIndexingBefore( HookEvent $event ) { $options = array(); $page = $event->arguments("page"); // abort when true if(!$page->template->hasField("index")) return; if($page->isNew() || $page->isTrash()) return; // save user lang $language = $this->wire("user")->language; // clear index field at the begin $page->index = ''; if($page->is("template=specialities-clinics")){ $options['sender'] = $page->choose_sender_2016->id; } $options['pagename'] = $page->name; foreach($this->wire("languages") as $lang) { $this->wire("user")->language = $lang; // change user lang wire('pages')->setOutputFormatting(true); $content = $page->render($options); wire('pages')->setOutputFormatting(false); if($content){ $startStr = "<!--### start-indexing-area ###-->"; $endStr = "<!--### end-indexing-area ###-->"; preg_match_all('/'.$startStr.'(.*)'.$endStr.'/siU', $content, $matches); $newContent = preg_replace("/<div class='breadcrumb.*'>.*<\/div>/siU", '', $matches[1][0]); $newContent = str_replace('<', ' <', $newContent); $newContent = strip_tags($newContent); $newContent = preg_replace("/\s\s+/", " ", $newContent); } $page->index .= $newContent; } $this->wire("user")->language = $language; // restore user language }
  7. How do you access ProcessWire API from an external file? I wrote a class and I need to use the API from there...my php file is in templates/includes/file.php <?php namespace ProcessWire; include_once('../../../index.php'); class myClass { private function ($query){ return $sanitizer->selectorValue($query); } } I get this error: Call to a member function selectorValue() on a non-object
  8. Hello all, Just starting out with ProcessWire and am wondering the best method to get set up to use bootstrap with it. I did already install ProcessWIre and everything is working but was not sure if there was a simple method to include bootstrap. Thank You.
  9. My question is simple. How to access WireMail with bootstraping ProcessWire?
  10. Bootstrap-4 Minimal site profile for ProcessWire This profile is based on the "minimal site profile (intermediate edition)" and bundled with Boostrap v4.4.1 Features Bootstrap SASS Font-Awesome SASS Render / helper functions for : Simple ul navigation Bootstrap Multi-level navbar Bootstrap Carousel Bootstrap Cards Bootstrap Jumbotron Boostrap Accordion Assets minification, files bundle Dependencies jQuery Popper.js Bootstrap FontAwesome Prequisites You'll want to install the following on your system before proceeding: Yarn / NPM How To Install Download the zip file at Github or clone directly the repo with git clone and skip the step 2. Extract the folder site-pwbs4-master into a fresh ProcessWire installation root folder. During the installation of ProcessWire, choose the profile "ProcessWire Bootstrap 4 profile". After installation You can find the development file (CSS/SCSS/JS) in site/assets/dev/src The profile can be used as is only with $config->debug set to false. To use it in debug mode, you are required to install the dependencies with the package manager. Open a terminal in site/assets/dev and execute the following command-line: yarn Available commands : Rebuild, minify and bundle assets for release : yarn build References Bootstrap v4 documentation ProcessWire documentation ProcessWire Forum: bootstrap tag ProcessWire Forum: bootstrap related posts Credits The ProcessWire staff Inspiration from @gebeer and his Bootstrap 3 profile post Members who contributed in various post about Bootstrap navigation and code (see code-source for refs). Screenshots
  11. Anyone else looking for a solution for bootstrap navigation? I have found this wiki but it´s not working: http://wiki.processwire.com/index.php/Bootstrap_Navbar#The_Navbar Here is my modified solution, I hope there are no bug´s. The Navbar <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <span class="sr-only">Navigation ein-/ausblenden</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#"><img src="#" alt="Logo"></a> </div> <div lass="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <?php include("topnav.inc"); ?> </div><!--/.nav-collapse --> </div> </nav><!-- /navbar --> The Menu content of ('topnav.inc') <?php /* Navigation for ProcessWire using the Bootstrap 3.5 markup This menu was written by Soma based on work by NetCarver and a bit thrown in by Joss | modified by David Schmidt */ function renderChildrenOf($pa, $output = '', $level = 0) { $output = ''; $level++; foreach($pa as $child) { $atoggle = ''; $class = ''; if ($child->numChildren && count($child->parents) == 1) { $class .= 'dropdown'; $atoggle .= ' class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" '; } else if($child->numChildren && $child->id != 1){ $class .= 'dropdown-menu'; } // Makes the current page and it's top level parent add an active class $class .= ($child === wire("page") || $child === wire("page")->rootParent) ? " active" : ''; $class = strlen($class) ? " class='".trim($class)."'" : ''; if ($child->numChildren && count($child->parents) >= 1) { $output .= "<li$class><a href='$child->url'$atoggle>$child->title<span class='caret'></span></a>"; } else{$output .= "<li$class><a href='$child->url'$atoggle>$child->title</a>";} // If this child is itself a parent and not the root page, then render it's children in their own menu too... if($child->numChildren && $child->id != 1) { $output .= renderChildrenOf($child->children, $output, $level); } $output .= '</li>'; } $outerclass = ($level == 1) ? "nav navbar-nav" : 'dropdown-menu'; return "<ul class='$outerclass'>$output</ul>"; } // bundle up the first level pages and prepend the root home page $homepage = $pages->get(1); $pa = $homepage->children; $pa = $pa->prepend($homepage); // Set the ball rolling... echo renderChildrenOf($pa); ...do something great with it. Regards David
  12. Hi, We're looking for a PW freelancer (preferably based around Gloucestershire/South West - but will consider further afield) to build the front-end for a PW site we're currently building. The site has been designed (files available) and prototyped. Currently we are building the backend (members) area which pulls in a JSON feed and stores it in PW. This information is then shown to the Members. A restricted view of the data is shown to the public. Timescales for this project are to go live on W/C 18th April. Please post here with contact details and website URLs and I will contact you. Many thanks Pete Jones Head of Digital www.jfd.co.uk
  13. Hello, I have two Processwire installations which should share an entire part (a collection of plants). Now I tried to include the installation with all the content (plants) (site1) into the other installation (site2). This gives me the error: Compile Error: Cannot redeclare class ProcessWire\ProcessWire (line 696 of /var/www/virtual/site2/site/assets/cache/FileCompiler/var/www/virtual/site1/wire/core/ProcessWire.php) Is there a trick, a hint what I have to do? Must I do something with the namespaces? Is there something to do in the config.php? In site1 I use PW 3.0.11 and in site2 I use PW 3.0.12.
  14. 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?
  15. Official Announcement: http://blog.getbootstrap.com/2015/08/19/bootstrap-4-alpha/ Hacker News Discussion: https://news.ycombinator.com/item?id=10086651
  16. Hi, i work on a new start with my webpage on Processwire and have build a new Design with Bootstrap. Now i wonted to look it on my Phone and i saw that it looks like on Desktop. I can not find the problem! On my dummypage all works fine on Desktop and Phone. On processwire the Design works fine on Desktop, it scale perfekt but on my phone it doesn't work! Is there any what i must do in Processwire to scale on phones? http://dummy.mta-r.de http://processwire.mta-r.de What am I doing wrong?
  17. Hello, I'm a true beginner at processwire and this is my first post! So first of all I would like to address my cordial greeting to all of you What i want to know is how to handle a bootstrap list with field types in processwire. I could use a simple text input field with commas and cut them for iterating but this is not a good solution. And the other problem is that i also want to implement the bootstrap-tooltip (see attached image file) What is the best solution for this problem? Thank you very much in advance for your answer. regards, Gerald
  18. Hello, This is my first real project for a client, made with PW. I have a (little) issue in the site. In the screenshot below you can see in the footer menu, a little square (right). The menu is a inline UL and generated with this code: <ul class="list-inline text-center extra"> <?php $extra = $pages->get('/extra/'); $children = $extra->children(); foreach($children as $child) { echo "<li><a href='{$child->url}'>{$child->title}</a></li>"; }; ?>
 </ul> I tested adding links manually, and then the square is removed. <ul class="list-inline text-center extra"> <li><a href="#">menu 1</a> <li><a href="#">menu 2</a> </ul> How can I remove this square, when the menu is generated by PW? For the moment the site is in development, but you can see the square on your mobile phone on: jolisa.market-locator.com Regards, Christophe
  19. Hello, I have a new project in which people from site A should have the possibility to post a "news" which should automatically appear in site B. I think it's not possible to merge two PW installations by bootstraping site B to site A. Don't ask why both pages are not in the same installation ;-) My idea is to use a hook and post the data via ajax to a script which bootstraps site B. Then I post the data into that installation. To be capable to update the news simultanious in both installations I would use an unique field in both installations which will be the "id". Has anyone some better ideas or hints?
  20. A new website powered by Proceswire and Bootstrap. The following modules were used : AIOM MarkupSEO MarkupSitemapXML ModulesManager Other components : Slick (the last carousel you'll ever need) The website url : www.zemmam-avocat.com Thanks for your attention.
  21. Well I got this form done a while ago and am trying to debug why all the sudden it's not submitting any values for name,email,tel, and comments. I used soma's code to do this and its great but I thought someone might see the answer hidden in here. Thanks in advance for helping me out <div class="modal fade" id="contactModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <!--p id="id2" name = "id2" style="display:none;"></p>--> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4>Inquiry</h4></br> </div> <div class="modal-body"> <?php $sent = false; $contactEmail = $page->parent->Employee_Email; if ($page->parent->path == "/exhibitions/contemporary/"){ $contactEmail = $pages->get(1248)->Employee_Email; } if ($page->parent->path == "/exhibitions/antique/"){ $contactEmail = $pages->get(1249)->Employee_Email; } if ($page->parent->path == "/exhibitions/modern/"){ $contactEmail = $pages->get(1250)->Employee_Email; } // sanitize form values or create empty $form = array( 'fullname' => $sanitizer->text($input->post->fullname), 'email' => $sanitizer->email($input->post->email), 'tel' => $sanitizer->text($input->post->tel), 'url' => $page->httpUrl, 'comments' => $sanitizer->text($input->post->comments), ); // check if the form was submitted if($input->post->submit) { $artid = $input->post->artinfo; $artwork = $pages->get($artid); $artinfo = "Artist: " . $sanitizer->text($artwork->parent->artist_firstname); $artinfo .= " " . $sanitizer->text($artwork->parent->artist_lastname) . "\n"; $artinfo .= "Title: " . $sanitizer->text($artwork->title); //foreach($form as $key => $value) { // if ($key != 'tel'){ // if( strlen(trim($value)) == 0 ) { // $error = true; // break; // } // } //} // if no errors, email the form results if($input->post->url == "" && !$error) { $msg = "Full name: $form[fullname] \n" . "Email: $form[email] \n" . "Phone: $form[tel] \n" . "URL: $form[url] \n\n" . "-------------------\n\n" . "$artinfo" . "\n\n-------------------\n\n" . "Message: $form[comments]"; mail($contactEmail,"Website Inquiry", $msg, "From: notifier@davidsongalleries.com"); $session->redirect("./", false); $mailed = true; } } if(!$sent) { // sanitize values for placement in markup foreach($form as $key => $value) { $form[$key] = htmlentities($value, ENT_QUOTES, "UTF-8"); } // append form to body copy echo <<< _OUT <form id="contact" action="./" method="post"> <p> <label for="fullname">Your Name</label><span class="error">( required )</span> <input id="contact_fullname" class="form-control required" type="text" name="fullname" value="$form[fullname]" /> </p> <p class = "antispam"> <input class="nc" type="text" name="url" value = ""> </p> <p> <label for="email">Your Email</label><span class="error">( required )</span> <input id="contact_email" class="form-control required" type="email" name="email" value="$form[email]" /> </p> <p> <label for="tel">Your Phone Number (Optional)</label><br /> <input class="form-control nc" type="tel" name="tel" value="$form[tel]" placeholder="Enter phone number only if you wish to be called about this inquiry" /> </p> <p> <label for="comments">Comments</label><span class="error">( required )</span> <textarea id="contact_comments" class="form-control required" rows="10" name="comments">$form[comments]</textarea> </p> <!-- field to hold the art information--> <p class = "emailartinfo"> <input type="text" class="form-control nc" name="artinfo" id="sendartinfo" value=""> </input> </p> <p></p> _OUT; } ?> </div> <div class="modal-footer"> <input id="submitQuestion" class="btn btn-default" type="submit" name="submit" value="submit" /> <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a> </div> </form> </div> </div> </div>
  22. How can I make this work. downloaded it from module tab in PW and in new tab I searched for PROCESSWIREBOOTSTRAP3and download and installed but still not working, What I see is the default site.
  23. Disclaimer This is not a step by step tutorial, but the script posted serves as an example of how easy it is to bootstrap ProcessWire(PW), query an external API (in this case, Strava) and import stuff into PW pages using the PW API. To the import! So i wanted a quick, easy and automated way to import someones Strava activities into his/her own 'activity feed' on a certain PW website. Strava has an API which you can use to -amongst other things- get your own activity data. After setting up my Strava app i had access to the API. Next step was to import the JSON data i wanted into PW pages. This was as easy as creating a PW bootstrapped script (see code below) and using the PW API to import the data into Pages. For convenience in talking to the Strava API i used a library that is available on Github. To keep track of what was happening i decided it would be nice to log the import results to a log file. Luckily, PW had me covered by using the WireLog class (/wire/core/WireLog.php). Result With some googling on Strava and a (very) basic knowledge of PHP and the PW API i was able to get things working in no-time. With no other CMS i've worked with -and i've had dealings with quite a few- it would have been so easy to get the desired result. Some notes about the script: PW version used: 2.4.12, but should work in earlier versions as well. It does not create templates, fields and pages for you. If you would want to use it (maybe as a starting point), create templates, fields and pages for your own needs and adjust the script accordingly. Also remember to adjust script paths. In the posted example i don't do any sanitizing on the Strava data. You maybe should In production you would maybe call these kind of importers via a cronjob, and make it non-accessible from the outside. It served my purposes. There might be better ways of handling this stuff. All suggestions and/or questions are welcome. In this case the script was/is called importer_strava.php , located at mydomain/importer/importer_strava.php and requested manually. See notes above, number 3. <?php /** * Strava Importer * * This crude script will import your own Strava activities into newly created * PW pages under a given parent page. The import result will be logged in: * /site/assets/logs/importer_strava.txt, using the WireLog class. * * For this to work you first need to create an app via http://www.strava.com/developers * Strava API reference: http://strava.github.io/api/ * * The PHP library used for working with the Strava v3 API can be found at: * https://github.com/iamstuartwilson/strava * */ // Bootstrap Processwire include __DIR__ . '/../index.php'; // Include the PHP Library for working with the Strava v3 API include __DIR__ . '/StravaApi.php'; // Strava credentials (you can get these from the Strava app page you've created) $clientId = "Your clientId"; $clientSecret = "Your clientSecret"; $accessToken = "Your accessToken"; // Connect to Strava $api = new StravaApi( $clientId, $clientSecret ); // Set the parent where activities will be stored as child pages $activity_parent = wire('pages')->get("/activities/"); // Get new activities $results = $api->get( 'athlete/activities', $accessToken, array( 'after' => $activity_parent->strava_last_checked ) ); // Uncomment if you want to inspect the $results response onscreen // echo "<pre>"; // print_r($results); // echo "</pre>"; // Import new Strava activities to PW Pages if (empty($results)) { // Log that no activities have been imported $text = "No new activities have been imported"; $options = array('showUser' => false, 'showPage' => false); wire('log')->save('importer_strava', $text, $options); } else { $numImportedPages = 0; // Start counter for number of imported pages foreach ($results as $result) { $p = new Page(); // Create new page object $p->template = 'activity'; // Set template $p->parent = $activity_parent; // Set the parent // Assign $result data to the corresponding Page fields $p->name = $result->id; $p->title = $result->name; $p->act_distance = $result->distance; $p->act_moving_time = $result->moving_time; $p->act_elapsed_time = $result->elapsed_time; $p->act_total_elevation_gain = $result->total_elevation_gain; $p->act_type = $result->type; $p->act_start_date = substr($result->start_date_local, 0, 10); $p->act_average_speed = $result->average_speed; $p->act_start_lat = $result->start_latlng[0]; $p->act_start_long = $result->start_latlng[1]; $p->act_end_lat = $result->end_latlng[0]; $p->act_end_long = $result->end_latlng[1]; $map = $result->map; $p->act_map_polyline = $map->summary_polyline; $p->save(); // Save the Page object $numImportedPages++; // Increment counter } // Log the number of activities that have been imported $text = ($numImportedPages == 1) ? "$numImportedPages new activity imported" : "$numImportedPages new activities imported"; $options = array('showUser' => false, 'showPage' => false); wire('log')->save('importer_strava', $text, $options); // After the import, update Field 'strava_last_checked' to current Unix timestamp // This could also be placed outside of the 'else' to update on each script run $timestamp = $activity_parent; $timestamp->of(false); // Turn off output formatting before saving things $timestamp->strava_last_checked = time(); $timestamp->save('strava_last_checked'); }
  24. Prerequisites: Basic knowledge of git and git submodules A git hosting solution (e.g. GitHub) No aversion against bash commands Once you've built a couple of websites with it, a set of your own personal must-have modules emerges. For me, such a module and always the first install of the day is Soma's MarkupSimpleNavigation. But there's also MarkupSitemapXML. And so on. Depending on your usage of ProcessWire, the type of pages you build with PW or your customers, your set of modules may differ. Installing modules and functionalities that you'll need in most instances should be an automated and easy process. ProcessWire itself offers a range of possibilities to do so. First, there is installation via ClassNames: In Backend, chose "Modules", then "New" and paste or type in the class name the desired module established in the PW ecosystem, for example `LoginPersist`. From that point on, the particular module gets downloaded and installed within two clicks and just a matter of seconds. Rinse and repeat until your starter module set is complete, but be sure to memorize or note the correct class names. Secondly, you can create an own starter site profile with your modules in it. This not only gives you the means to bootstrap in a module related way but also many possibilities for template and field groundwork. But a disadvantage (on the module site) remains: Unless you control and update all the modules in your site profile, only certain, possibly outdated versions will be installed - and you have to manually update them afterwards. For my last few projects I found a third way: Bundling all starter/must-have modules together in a git repo, using the modules as git submodules. After ProcessWire installation on my local machine, I just clone this bundle and recursively pull every module's master to its latest commit. An example (with my set of starter modules): cd site/modules && git clone --recursive git@github.com:marcus-herrmann/ProcessWire-BootstrapModuleSet.git && cd ProcessWire-BootstrapModuleSet && git pull --recurse-submodules What does this code do? At first, let's assume you've navigated via the terminal to you ProcessWire's installation root folder. Afterwards, these steps follow: 1. Change directory to module folder 2. Clone your bundle repo 3. Change directory to the folder created by aforementioned bundle repo clone 4. Pull all submodules to their latest commit That's all. After you've created your own module bundle repo, you can even create a bash alias for this and accellerate the process even more: alias getpwstartmodules='cd site/modules && git clone --recursive git@github.com:marcus-herrmann/ProcessWire-BootstrapModuleSet.git && cd ProcessWire-BootstrapModuleSet && git pull --recurse-submodules' I possibly may have reinvented the wheel. But at least I haven't yet found such a way for "PW kickstarting" before (apart from maybe pure bred package managers such as npm and composer). But if a better solution exists, please do not hesitate to drop a comment here Disclaimer: This is also a blog post
  25. Hello, I'm working with the include& bootstrap API in order to include content from a different PW installation in my main website. It seems to work correctly, but sometimes (once per week) the page doesn't receive data from processwire (All the images and text are not showing) The only way I found to solve this is... login to the processwire admin page. Instantly the API starts to work again. This is the code I use: <?php function listPage($page, $level = 0) { if($page->numChildren) { foreach($page->children as $child) { ?> <div class="6u"> <div class="row"> <div class="6u box240 boxtext bg-color-events"> <h3><?php echo $child->title ?></h3> <p><?php echo $child->summary ?></p> <a class="scopri color-events" href="eventi?detail=<?php echo $child->name ?>"><span>scopri</span></a> </div> <a href="eventi?detail=<?php echo $child->name ?>"> <div class="6u box240 imghover color-events"> <?php $cover = $child->cover->first(); ?> <img src="/news<?php echo $cover->url;?>" alt="Vai al dettaglio dell'evento"> </div> </a> </div> </div> <?php } } }?> ..... <?php { listPage($wire->pages->get("/eventi/")); } ?> Did it ever happen to you? Any ideas about the possible cause?
  • Create New...