This file contains hidden or 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
This is an example for how to display the label selected for a dropdown value | |
in the notification template. It is a bit verbose in the template code, | |
so I am planning to add a new option soon which will make extracting the | |
selected label as easy as getting the selected value. | |
Screenshots showing how to setup the form and the field to send an email to | |
the address set as the value for the same dropdown field: | |
Field settings for a field named "state": | |
* https://skitch.com/blueapples/8iwir/state-notification-field |
This file contains hidden or 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 | |
///////////////////////////////////////////// | |
// Added hook call to EE_Extensions: | |
///////////////////////////////////////////// | |
class EE_Extensions { | |
... | |
function __construct() | |
{ | |
$this->EE =& get_instance(); |
This file contains hidden or 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
#include "widget.h" | |
//total event controllers | |
#define MAX_EVENT_CONTROLLERS 10 | |
//event controller | |
typedef struct EVENT_CONTROLLER | |
{ |
This file contains hidden or 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
./system/expressionengine/third_party/playa/ | |
diff /Volumes/HDD/Installers/CMS/EE/Playa4.3/Playa4/ee2/third_party/playa/ft.playa.php ./system/expressionengine/third_party/playa/ft.playa.php | |
1152a1153 | |
> array_unshift($authors, array('id' => 'related', 'title' => '— '.lang('related').' —')); | |
1525a1527,1592 | |
> // Related author? | |
> // ------------------------------------------- | |
> | |
> $add_to_sql = array(); | |
> if (($key = array_search('related', $this->settings['authors'])) !== FALSE) |
This file contains hidden or 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
function entries() { | |
$parent_id = $this->EE->TMPL->fetch_param('parent_id', false); | |
if ($parent_id) { | |
$child_ids = $this->sql->get_child_entries($parent_id); | |
$fixed_order = $child_ids !== FALSE && count($child_ids > 0) ? implode('|', $child_ids) : false; | |
if ($fixed_order) { | |
$this->EE->TMPL->tagparams['fixed_order'] = $fixed_order; |
This file contains hidden or 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
{ce:core:foreach in=beans} | |
<tr> | |
{ce:core:foreach in=loop_value} | |
{if loop_key == table_id} | |
<td>[{table_id}] {loop_key} = <a href="{cp_url}publish/edit/{type}/{loop_value}">{loop_value}</a></td> | |
{if:else} | |
{if loop_key == 'title'} | |
<td>title {loop_key} = <a href="{cp_url}publish/edit/{type}/{bean_id}">{loop_value}</a></td> | |
{if:else} | |
{if loop_key != 'loop_key' & loop_key != 'parent_id' & loop_key != 'bean_id'} |
This file contains hidden or 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
{ce:core:recurse in=tree children_field="__children"} | |
{loop_items} | |
<li> | |
<span><a href="{cp_url}publish/edit/{__type}/{__id}">{title}</a></span> | |
{if __children} | |
<ul> | |
{__children} | |
</ul> | |
{/if} | |
</li> |
This file contains hidden or 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 | |
class PF_View extends View { | |
public function __construct(View $view) | |
{ | |
if(!isset($this->EE)) $this->EE = &get_instance(); // <-- Add this line | |
$this->set_cp_theme($view->_theme); | |
} | |
public function head_title($title) |
This file contains hidden or 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
<div class="section sticky_nav"> | |
<div class="filter_nav"> | |
<ul> | |
{!-- category 2 -- a post type --} | |
{!-- build url so far --} | |
{exp:stash:set name="filter_base1"}{site_url}{segment_1}{if router_blog_name != ""}/{router_blog_name}{/if}/{if router_cat1 != ""}{router_cat1}{if:else}all{/if}{/exp:stash:set} | |
<li class="{if router_cat2_category_url_title == ''}active{/if}"><a href="{exp:stash:filter_base1 random}/all/">All Results</a></li> | |
{exp:channel:categories category_group="3" style="linear"} |
This file contains hidden or 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
// Field: Returning an array or object as a variable, for instance in a fieldtype | |
ee()->load->library('handle_manager'); | |
$results = ee()->db->get('table_mapping')->results(); | |
$table_pattern = array( | |
"table_data" => ee()->handle_manager->register($results) // Returns a handle, e.x.: {&100} | |
); | |
ee()->TMPL->parse_variables($tagdata, array($table_pattern)); | |
{!-- Take the array of data in the table_data variable and pass it as a parameter to the plugin --} | |
{meta_table} |