Version: 1.9.7
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
$query = craft()->elements->buildElementsQuery(); | |
$query->andWhere(DbHelper::parseDateParam("content.field_eventStart", '>='.$startDate, $query->params)); | |
$query->andWhere(DbHelper::parseDateParam("content.field_eventEnd", '<='.$endDate, $query->params)); | |
$results = $query->queryAll(); |
{% set excludedIds = [] %} | |
{% set allProducts = craft.entries.section('products') %} | |
{% for product in allProducts %} | |
{% if product.productCategories|length %} | |
{% set excludedIds = excludedIds|merge(['not '~product.id]) %} | |
{% endif %} | |
{% endfor %} | |
{% set products = craft.entries.section('products').id(excludedIds).limit(null) %} |
{# news/_entry.twig #} | |
{% block breadcrumbs %} | |
{{ macro.breadcrumbs(entry, { parent: craft.entries.id(45).first() }) }} | |
{% endblock %} |
{% macro datesBetween(startDate, endDate, currentDate = null) %} | |
{% import _self as self %} | |
{# initialize the currentDate from the startDate #} | |
{% if currentDate is null %} | |
{% set currentDate = startDate %} | |
{% endif %} | |
{# echo the current date, or the startDate if it's the first run #} | |
<li>{{ currentDate }}</li> |
{% set searchTerm = craft.request.getParam('search') %} | |
{% set entries = craft.entries.hideFromSearchResults([0]).search(searchTerm).limit(25) %} | |
{% if searchTerm and entries|length %} | |
{% paginate entries as page %} | |
{% for entry in page %} | |
{% include [ entry.section.handle~"/_excerpt-search", | |
"pages/_excerpt-search", | |
"_errors/template-missing-search" ] %} | |
{% endfor %} |
{%- if currentUser.admin | |
or ( | |
( entry.authorId == currentUser.id and currentUser.can('editEntries:' ~ entry.section.id) ) | |
or ( entry.authorId != currentUser.id and currentUser.can('editPeerEntries:' ~ entry.section.id) ) | |
or ( | |
entry.section.type == 'Single' and | |
( entry.authorId == currentUser.id and currentUser.can('editEntries:' ~ entry.section.id) ) | |
or ( entry.authorId != currentUser.id and currentUser.can('editPeerEntryDrafts:' ~ entry.section.id) ) | |
) | |
) |
<link rel="import" href="../google-map/google-map.html"> | |
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |
<?php | |
namespace Craft; | |
class EntryTypeSourcesPlugin extends BasePlugin | |
{ | |
public function getName() | |
{ | |
return Craft::t('Entry Type Sources'); | |
} |