This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form name='search' id='product-search' method='get' action='<?php echo $config->urls->root?>speaker-finder/'> | |
<ul id="row1"> | |
<li> | |
<label for='search_app'>Application</label> | |
<select id='search_app' name='application' onchange="$(this.form).trigger('submit')"> | |
<option value=''>Any</option><?php | |
// generate the application options, checking the whitelist to see if any are already selected | |
foreach($pages->get(1016)->children('include=all') as $app) { | |
$selected = $app->name == $input->whitelist->application ? " selected='selected' " : ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// check if there are GET variables present in the URL | |
if(count($input->get)) { | |
$selector = ''; | |
if($input->get->application) { | |
$application = $sanitizer->pageName($input->get->application); | |
$appid = $pages->get("template=product-options, name=$application"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<!-- all your typical <head> stuff --> | |
<?php | |
$file = "styles/$page->template.css"; | |
if(is_file($config->paths->templates . $file)) { | |
echo "<link rel='stylesheet' type='text/css' href='{$config->urls->templates}$file' />"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Sample Content to Plugin to Template --> | |
<h1>CSS Basic Elements</h1> | |
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p> | |
<hr /> | |
<h1 id="headings">Headings</h1> | |
<h1>Heading 1</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://processwire.com/talk/topic/1938-building-an-advanced-search-form-with-form-builder/?p=36295 | |
<form name='search' id='product-search' method='get' action='<?php echo $config->urls->root?>speaker-finder/'> | |
<ul id="row1"> | |
<li> | |
<label for='search_app'>Application</label> | |
<select id='search_app' name='application' onchange="$(this.form).trigger('submit')"> | |
<option value=''>Any</option><?php | |
// generate the application options, checking the whitelist to see if any are already selected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="/customer-service/contact/contact-success/" method="post"> | |
<p><label for="contactname">Name:</label></p> | |
<p><input type="text" name="contactname"></p> | |
<p><label for="email">E-Mail:</label></p> | |
<p><input type="email" name="email"></p> | |
<p><label for="comments">Comments:</label></p> | |
<p><textarea name="comments" cols="25" rows="6"></textarea></p> | |
<button type="submit">Submit</button> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Let's assume the pages in question are named like Blah1, Blah2, etc. | |
foreach ($pages->find('name^=Blah') as $blahPage) { | |
// Let's assume the fields that need to contain HTML are called Html1, etc. | |
foreach ($blahPage->fields->find('name^=Html') as $field) { | |
// Let's assume these fields have their value in ShouldBeHtml | |
$fieldContent = $field->ShouldBeHtml; | |
$contentWrapped = ''; | |
// Parse the field's content as HTML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Simple Pagination For Processwire | |
###ProcessWire Requirements | |
On the template you want pagination. Go to the url's tab where you will have to: | |
- Activate Allow Page Numbers. | |
- Activate Allow URL Segments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
From Marty Walker Pastie | |
Picturefill markup with ProcessWire image sizing | |
https://github.com/scottjehl/picturefill/ | |
http://processwire.com/ | |
*/ | |
<div data-picture data-alt='{$page->title}'> | |
<div data-src='{$image->size(50,0)->url}'></div> |