/** * BreadCrumb * Copyright 2011 Benjamin Vauchel * * BreadCrumb is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) any * later version. * * BreadCrumb is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * BreadCrumb; if not, write to the Free Software Foundation, Inc., 59 Temple Place, * Suite 330, Boston, MA 02111-1307 USA * * @package breadcrumb * @author Benjamin Vauchel * * @version Version 1.4.3 pl * 07/03/15 * * Breadcrumb is a snippet for MODx Revolution, inspired by the Jared's BreadCrumbs snippet. * It will create a breadcrumb navigation for the current resource or a specific resource. * * Optional properties: * * @property from - (int) Resource ID of the first crumb; [Default value : 0]. * @property to - (int) Resource ID of the last crumb; [Default value : current resource id]. * @property exclude - (string) Comma separated list of resources IDs not shown in breadcrumb. [Default value : []] * @property maxCrumbs - (int) Max crumbs shown in breadcrumb. Max delimiter template can be customize with property maxCrumbTpl ; [Default value : 100]. * @property showHidden - (bool) Show hidden resources in breadcrumb; [Default value : true]. * @property showContainer - (bool) Show container resources in breadcrumb; [Default value : true]. * @property showUnPub - (bool) Show unpublished resources in breadcrumb; [Default value : true]. * @property showCurrentCrumb - (bool) Show current resource as a crumb; [Default value : true]. * @property showBreadCrumbAtHome - (bool) Show BreadCrumb on the home page; [Default value : true]. * @property showHomeCrumb - (bool) Add the home page crumb at the start of the breadcrumb; [Default value : true]. * @property useWebLinkUrl - (bool) Use the weblink url instead of the url to the weblink; [Default value : true]. * @property direction - (string) Direction or breadcrumb : Left To Right (ltr) or Right To Left (rtl) for Arabic language for example; [Default value : ltr]. * @property scheme - (string) URL Generation Scheme; [Default value : -1]. * * Templates : * * @property containerTpl - (string) Container template for BreadCrumb; [Default value : BreadCrumbContainerTpl]. * @property currentCrumbTpl - (string) Current crumb template for BreadCrumb; [Default value : BreadCrumbCurrentCrumbTpl]. * @property linkCrumbTpl - (string) Default crumb template for BreadCrumb; [Default value : BreadCrumbLinkCrumbTpl]. * @property categoryCrumbTpl - (string) Default category crumb template for BreadCrumb; [Default value : BreadCrumbCategoryCrumbTpl]. * @property maxCrumbTpl - (string) Max delimiter crumb template for BreadCrumb; [Default value : BreadCrumbMaxCrumbTpl]. */ // Script Properties $from = !empty($from) ? $from : $modx->getOption('from', $scriptProperties, 0, true, true); $to = $currentResourceId = !empty($to) ? $to : $modx->getOption('to', $scriptProperties, $modx->resource->get('id'), true); $exclude = !empty($exclude) ? explode(',', $exclude) : array(); $maxCrumbs = !empty($maxCrumbs) ? abs(intval($maxCrumbs)) : $modx->getOption('maxCrumbs', $scriptProperties, 100, true); $showHidden = isset($showHidden) ? (bool)$showHidden : (bool)$modx->getOption('showHidden', $scriptProperties, true, true); $showContainer = isset($showContainer) ? (bool)$showContainer : (bool)$modx->getOption('showContainer', $scriptProperties, true, true); $showUnPub = isset($showUnPub) ? (bool)$showUnPub : (bool)$modx->getOption('showUnPub', $scriptProperties, true, true); $showCurrentCrumb = isset($showCurrentCrumb) ? (bool)$showCurrentCrumb : (bool)$modx->getOption('showCurrentCrumb', $scriptProperties, true, true); $showBreadCrumbAtHome = isset($showBreadCrumbAtHome) ? (bool)$showBreadCrumbAtHome : (bool)$modx->getOption('showBreadCrumbAtHome', $scriptProperties, true, true); $showHomeCrumb = isset($showHomeCrumb) ? (bool)$showHomeCrumb : (bool)$modx->getOption('showHomeCrumb', $scriptProperties, true, true); $useWebLinkUrl = isset($useWebLinkUrl) ? (bool)$useWebLinkUrl : (bool)$modx->getOption('useWebLinkUrl', $scriptProperties, true, true); $direction = !empty($direction) ? $direction : $modx->getOption('direction', $scriptProperties, 'ltr', true); $scheme = !empty($scheme) ? $scheme : $modx->getOption('scheme', $scriptProperties, $modx->getOption('link_tag_scheme'), true); $containerTpl = !empty($containerTpl) ? $containerTpl : $modx->getOption('containerTpl', $scriptProperties, '@INLINE '); $homeCrumbTpl = !empty($homeCrumbTpl) ? $homeCrumbTpl : $modx->getOption('homeCrumbTpl', $scriptProperties, '@INLINE
  • '); $currentCrumbTpl = !empty($currentCrumbTpl) ? $currentCrumbTpl : $modx->getOption('currentCrumbTpl', $scriptProperties, '@INLINE
  • '); $linkCrumbTpl = !empty($linkCrumbTpl) ? $linkCrumbTpl : $modx->getOption('linkCrumbTpl', $scriptProperties, '@INLINE
  • '); $categoryCrumbTpl = !empty($categoryCrumbTpl) ? $categoryCrumbTpl : $modx->getOption('categoryCrumbTpl', $scriptProperties, '@INLINE
  • '); $maxCrumbTpl = !empty($maxCrumbTpl) ? $maxCrumbTpl : $modx->getOption('maxCrumbTpl', $scriptProperties, '@INLINE
  • ...
  • '); // include parseTpl include_once $modx->getOption('breadcrumb.core_path',null,$modx->getOption('core_path').'components/breadcrumb/includes/').'include.parsetpl.php'; // Output variable $output = ''; // We check if current resource is the homepage and if breadcrumb is shown for the homepage if (!$showBreadCrumbAtHome && $modx->resource->get('id') == $modx->getOption('site_start')) { return ''; } // We get all the other crumbs $crumbs = array(); $crumbsCount = 0; $resourceId = $to; while ($resourceId != $from && $crumbsCount < $maxCrumbs) { if (!$resource = $modx->getObject('modResource', $resourceId)) { break; } // We check the conditions to show crumb if ( $resourceId != $modx->getOption('site_start') // ShowHomeCrumb && (($resource->get('hidemenu') && $showHidden) || !$resource->get('hidemenu')) // ShowHidden && (($resource->get('isfolder') && $showContainer) || !$resource->get('isfolder')) // ShowContainer && ((!$resource->get('published') && $showUnPub) || $resource->get('published')) // UnPub && (($resourceId == $currentResourceId && $showCurrentCrumb) || $resourceId != $currentResourceId) // ShowCurrent && !in_array($resourceId, $exclude) // Excluded resources ) { // If is LTR direction, we push resource at the beginning of the array if ($direction == 'ltr') { array_unshift($crumbs, $resource); } // Else we push it at the end else { $crumbs[] = $resource; } $crumbsCount++; } $resourceId = $resource->get('parent'); } // Add home crumb if ($showHomeCrumb && $resource = $modx->getObject('modResource', $modx->getOption('site_start'))) { if ($direction == 'ltr') { array_unshift($crumbs, $resource); } else { $crumbs[] = $resource; } } // We build the output of crumbs foreach($crumbs as $key => $resource) { // Home crumb tpl ? if ($resource->get('id') == $modx->getOption('site_start')) { $tpl = $homeCrumbTpl; } // Current crumb tpl ? elseif ($showCurrentCrumb && ($resource->get('id') == $currentResourceId)) { $tpl = $currentCrumbTpl; } // resource is a container only, calculated in a similar manner to Wayfinder elseif ($resource->get('isfolder') && ( $resource->get('template') == 0 || strpos($resource->get('link_attributes'), 'rel="category"') !== false ) ) { $tpl = $categoryCrumbTpl; } // or default crumb tpl ? else { $tpl = $linkCrumbTpl; } // Placeholders $placeholders = $resource->toArray(); if ($resource->get('class_key') == 'modWebLink' && $useWebLinkUrl) { if (is_numeric($resource->get('content'))) { $link = $modx->makeUrl($resource->get('content'), '', '', $scheme); } else { $link = $resource->get('content'); } } else { $link = $modx->makeUrl($resource->get('id'), '', '', $scheme); } $placeholders = array_merge($resource->toArray(), array('link' => $link)); // Output $output .= parseTpl($tpl, $placeholders); } // We add the max delimiter to the crumbs output, if the max limit was reached if ($crumbsCount == $maxCrumbs) { // If is LTR direction, we push the max delimiter at the beginning of the crumbs if ($direction == 'ltr') { $output = parseTpl($maxCrumbTpl).$output; } // Else we push it at the end else { $output .= parseTpl($maxCrumbTpl); } } // We build the breadcrumb output $output = parseTpl($containerTpl, array( 'crumbs' => $output, )); return $output; return; 1

    Rainer Group

    Reading list

    Tupaia General
    Tupaia model for biomedical research Cao et al J Med Primatol 2003
    Tree Shrew handbook Fuchs 2010 
     
    Tupaia Electrophysiology
    Luminance evoked inhibition Fitzpatrick Lab J Neurosci 2006 
    Population coding and divisive suppression Fitzpatrick Lab Nature Neurosci 2009
    mAChR dependent LTP and LTD in V1 layer 2/3 McMahon Lab J Neurophysiol 2008
     
    Tupaia Anatomy
    Fitzpatrick V1 review Cereb Cortex 1996 
    Visual Pulvinar subdivisions using AChE staining Kaas Lab J Comp Neurol 2003
    Temporal Cortex Pulvinar connections Bickford Lab Cereb Cortex 2009
    V1 Layer VI connectivity Fitzpatrick Lab J Neurosci 1996
    Four visual Areas in tree shrew Sesma&Kaas J Comp Neurol 1984
    Tree shrew cortex anatomical subdivisions Wong&Kaas The Anatomical Record 2009 
     
    Tupaia Behavior
    Tupaia Spatial Contrast Sensitivity Vis Res 1984 
    Matlab based animal trackingJ Neuro Methods 2005
     
    Tupaia Depression
    Van Kampen et al Stress.2002
    Models of Depression Bookchapter 
     
    V1 Monkey/Rat Electrophysiology
    Entrainment of Spiking Responses to CRT refresh Hawken Lab JNeurosci 2004
    More OFF than ON Neurons in Layer 2/3  Shapley Lab JNeurosci 2009 
    Sparse Noise vs. Hartley V1 RF2 Shapley Lab PNAS 2009
    Layer specific oscillations and STRF in rat Dan Lab PNAS 2009
    V1 Layer 6 Gain Control Scanziani.2012 
     
    Cholinergic System
    Cholinergic Pathways book chapter Exploring Cholinergic Nervous System Kraczmar 2007  
    Sarter review on ACh and attention Parikh&Sarter Ann NY Acad Sci 2008
    Thiele V1 ACh muscarinic effect monkey Thiele Nature 2008  
    Sarter review phasic ACh & volume transmission Sarter Nat Rev Neurosci 2009
    Methods section from Sarter Neuron paper with technical details
    Pepeu&Giovannini Review ACh extracellular levels & cognition Learn Mem 2004
    nAChR induced memory enhancement Review Sarter lab Biochem Pharmacol 2009
    Thiele Anesth. Marmoset V1 ACh effects I Thiele Lab J Neurophysiol 2005
    Thiele Anesth. Marmoset V1 ACh effects II Thiele Lab EJN 2006
    Rasmusson basal forebrain microstim V1 VEP monitoring paper Neuroscience 2009 
    Rasumusson V1/S1/A1 microdialysis paper Neuroscience 2004
    Materi/Semba HPLC methods paper ACh/Glu/GABA EJN 2001
    Vaucher ACh induced V1 VEP enhancement Plos One 2009
    Vaucher ACh Anatomy/Behavior Neuroscience 2008
    Vaucher PF/Visual ACh levels Neuroscience 2005 
    ACh anatomical and behavioral effects on rat V1 Neuroscience 2008
    Basal forebrain microstim natural scence coding in rat Nat Neurosci 2009
    Mouse prefrontal EEG ACh Lydic lab J Neurophysiol 2002
    ACh release to tail pinch Stengard 1995 

    Hierarchical control of dopamine neuron-firing patterns by nicotinic receptors, Neuron, 2006

     Long-term effects of chronic nicotine exposure on brain nicotinic receptors, PNAS, 2007
    Gain Modulation by Nicotine in Macaque V1, Neuron, 2007
    AChE Inhibitors clinical evaluation Pepeu Chem-Bio Interaction 2008
     
    Electrochemical Detection
    ACh and Ch monitored in monkey hippocampus during theta Nicolelis Lab J Neuro Methods 2009
    DA monitored in vivo Suad-Chagny Methods 2004
    GPIB based homemade Voltametry system Pospisil Lab Rev Sci Instr 2000
    Joint DA and laminar probe Kipke group 2008
     
    Nanoprobes / Electrodes
    ECoG array for monkeys Fries/Stieglitz labs J Neural Eng 2009
    Blazquez deep brain probes J Neurosci Meth 2009
    Thiele 3 barrel recording/drug probe J Neurosci Meth 2006
    In vivo DBS impedance spectroscopy J Neural Eng 2009
    Chronic monkey electrophysiology Jackson JNeurophys 2007
    Neurologger Pigeon EEG Lipp group J Neurophys 2006
    Carbon fiber iontophoresis probe Lorden 1996
    Multi barrel recording / iontophoresis Kubota 1990
    Chudler microelectrode J Neurosci Meth 1994
    Godwin iontophoresis microelectrode J Neurosci Meth 1993
    Polyimide Electrodes China J Neurosci Meth 2009
    Iontophoresis Chapter Lalley
     
    Deep Brain Stimulation
    DBS adenosine alleviates Parkinson Tremor Nat Med 2009
    DBS caudate nucleus elicits GABA J Neurosci Meth 2007 
    DBS mechanisms review Clin Neurophysiol 2004 
     
    Neurovascular Coupling
    Lauritzen/Hamel pathway specific neurovascular coupling Jcbvm 2009
     
    Neuropeptides
    Neuropeptides Learning Memory Review Eur J Pharamcol 2010 
    Neglected Aspects cholinergic function Whitaker 2009
    Orexin BF activation Acta Physiol 2009
    Orexin BF attention Brain Res 2009
    Orexin/Cholinergic Effects on Cortex Ann NY Acad Sci 2009
    Orexin Sevoflurane emergence Neuropeptides 2009
    Orexin BF microdialysis  Pharm Biochem Behav 2009
    Neuropeptide Y BF Zsabosrzky 2007
    Galanin memory impairment Neurobiol Learning Memory 2009
    Galanin & Alzheimer disease Cell Mol Life Sci 2009
    Galanin Cognition Review  Cell Mol Life Sci 2008
    PACAP nictotine effect enhancement Mol Cell Neurosci 2009 
    NCS-1 hippocampus spatial memory Neuron 2009
    Angiotensin cognitive enhancement BMC Neuroscience 2008
    Nocioceptin counteracts cholinergic blockade Brain Res 2008
    Kennedy lab MS neuropeptide analysis review Anal Chem 2005
    Sweedler microproteomics review MS reviews 2008
     
    Anaesthesia
    EEG effects of anaesthetic agents Anesthesia 2006
     
    Cholinergic fMRI
    Thiel auditory ACh effects review 2007
    Thiel ACH learning & memory review 2003
    Bentley ACh visual attention Neuroimage 2003 
    Thiel Nicotine Alertness J Neurophys 2007
    Thiel Encoding Retrieval  J Neurosci 2009
    Silver ACh V1 spatial focusing Neuron 2008 
     
    Herzog psychophysics papers
    Crowding paper Saarela et al Jov 2009
    Retinotopy paper Boi et al JoV 2009
     
    EEG-FMRI
    EEG-FMRI System HF1 blueprint Bonmassar lab J Neurosci Meth 2008
     
    LFP-Spikes

    Gawne.local.nonlocal.lfp.JCompNeuro.2010

     Katzner.gabaa.response.gain.V1.JNeurosci.2011
    Katzner.local.origin.lfp.V1.neuron.2008
    Shapley.lfp.mua.dynamics.V1.JNeurosci.2010
    Shapley.spatial.spread.LFP.V1.JNeurosci.2009
    Shapley.sync.gamma.V1.JNeurosci.2011
    Gray.V1.movies.correlations.JNeurosci.2011
    Buffalo.Gamma.superficial.deep.layers.PNAS.2011
    Neuenschwandner.gamma.expectation.V1.JNeurosci.2011
    Thiele.lfp.spiking.dissociation.V1.EJN.2012
    Leopold.Infragranular.LFP.JNeurosci.2011
    Leopold.Supragranular.Gamma.LFP.Frontiers.2010 
     
    Color Perception 
    Color.Perception.dichromat.horse Roth.J.Exp.Biol.2007
    ColorVision.tree.shrew Jacobs.VisRes.1986
     
    Computational
    V1 perceptual inference Deneve.JNeurosci.2012