Skip to content

Instantly share code, notes, and snippets.

View outflux3's full-sized avatar

Marc outflux3

  • nibiri
  • Sunny Goldens Bridge, NY
View GitHub Profile
@teppokoivula
teppokoivula / init.php
Created April 13, 2019 07:20
Generate search index for saved pages in ProcessWire
<?php
/**
* Generate search index for saved pages
*
*/
$this->addHook('Pages::saveReady', function(HookEvent $event) {
$page = $event->arguments[0];
if ($page->id && $page->hasField('search_index')) {
$page->search_index = indexPage($page, array(
@adrianbj
adrianbj / HideOtherUserPages
Created January 16, 2015 18:41
PW module for hiding pages that don't match the user's name, under a certain parent page - currently hard coded parent name: visitenkarte
<?php
/**
*
*
* ProcessWire 2.x
* Copyright (C) 2010 by Ryan Cramer
* Licensed under GNU/GPL v2, see LICENSE.TXT
*
* http://www.processwire.com