Skip to content

Instantly share code, notes, and snippets.

{exp:channel:entries${1:
cache="yes" refresh="${2:10}"}${3:
disable="categories|category_fields|${4:custom_fields|}member_data|pagination|trackbacks"}${5:
entry_id="${6:{segment_$7\}}"}${8:
limit="1"}${9:
rdf="off"}${10:
url_title="${11:{segment_$12\}}"}${13:
weblog="$14"
}}
$15
<!DOCTYPE html>
<html>
<head>
<title>iPhone Toggle</title>
<style>
label.checkbox{
background:url('../img/toggle.png') no-repeat top left;
cursor:pointer;
display:block;
height:0;
{!--
Add this to your index page.
Returns the content before <!-- #more --> including the replacement
The idea is you can use a comment in a single custom field and only return a sub-section.
find="" accepts a regular expression which allows you to add <!-- #more --> inside a paragraph block.
--}
{exp:nsm_content_split:split find="#<!-- #more -->(<\p>)?#"}
{replace_with}<a href="{comment_url_title}">More &hellip;</a>$1{/replace_with}
{news_content}
{exp:nsm_content_split:split}
<?php
/**
* NSM Example Addon Display
*
* Usage:
*
* $this->EE->load->library("nsm_live_look_display");
*
* # Add the custom field stylesheet to the header
* $this->EE->nsm_live_look_display->addCSS('custom_field.css');