Presentazione di PowerPoint
Transcript
Presentazione di PowerPoint
CREARE TEMPLATE PER JOOMLA! Creare template per Joomla www.3rd-graphic.it Claudio Carrera Sono un sviluppatore siti web freelance, mi occupo principalmente di realizzazione d’interfacce web per CMS proprietari e open source, in particolar modo siti web realizzati con CMS Joomla. Ho lavorato presso molte aziende in tutta Italia. Lavorando non solo lo sviluppo grafico, ma anche la programmazione di estensioni per Joomla Associato a Joomlalombardia dal 2014 site: www.3rd-graphic.it email: [email protected] Creare template per Joomla www.3rd-graphic.it Creare template per Joomla www.3rd-graphic.it Sul tuo sito ci lavoreranno anche altri CERCA DI EVITARE ORRORI ERRORI: Creare template per Joomla www.3rd-graphic.it Errore 1: Struttura del template all’interno dell’ articolo Creare template per Joomla www.3rd-graphic.it Errore 2: css inline non ottimizzato Creare template per Joomla www.3rd-graphic.it ERRORE 3: Modifica diretta dei file del core del CMS , senza uso del template override Creare template per Joomla www.3rd-graphic.it PER NON AVERE COLLEGHI / FREELANCE COSI: VEDIAMO COME CREARE UN TEMPLATE IN JOOMLA Creare template per Joomla www.3rd-graphic.it Struttura dei file Creare template per Joomla www.3rd-graphic.it Index.php: Primo file caricato dal Template, contiene solitamente la struttura base del layout. Creare template per Joomla www.3rd-graphic.it HTML: Cartella per il template override di Joomla. Creare template per Joomla www.3rd-graphic.it Templatedetails.xml: Helper del template usato per: - Installazione - Gestione campi dinamici del template - Posizioni dei moduli Creare template per Joomla www.3rd-graphic.it CSS/JS/IMAGES/FONTS: Contengono file css, js, ecc… PS: per usare less meglio Usare cartella css per I css E less per I file less Creare template per Joomla www.3rd-graphic.it Creazione template vuoto - Creiamo la cartella principale al - Creiamo le sottocartelle (html, css, language ecc…) - Creiamo index.php - Creiamo file templatedetails.xml Creare template per Joomla www.3rd-graphic.it templatedetails.xml Creare template per Joomla Versione joomla www.3rd-graphic.it Tipologia di estensione frontend Creare template per Joomla www.3rd-graphic.it Nome cartella template Versione template Descrizione template Creare template per Joomla www.3rd-graphic.it File templatedetails.xml Cartelle File della root principale Creare template per Joomla www.3rd-graphic.it File templatedetails.xml chiusura Creare template per Joomla index.php t www.3rd-graphic.it IMPORTANTE: evita attacchi esterni Creare template per Joomla www.3rd-graphic.it index.php Meta tag Messaggi di sistema Componente moduli Creare template per Joomla www.3rd-graphic.it TEMPLATE PRONTO! SI PASSA ALL’ INSTALLAZIONE!! zippato Cartella temporanea Creare template per Joomla BASE TEMPLATE PRONTA SI PASSA ALLO SVILUPPO www.3rd-graphic.it Creare template per Joomla t www.3rd-graphic.it CREAZIONE OVERRIDE COMPONENTI / MODULI / PLUGIN Creare template per Joomla www.3rd-graphic.it INSERIMENTO FILE CSS JFactory::getDocument()-> addStyleSheet('percorso del file’, tipo, media); INSERIMENTO FILE JS JFactory::getDocument()-> addScript ('percorso del file’, tipo); Creare template per Joomla www.3rd-graphic.it DEFINIRE PERCORSO DI UN FILE Se il percorso è: Root/templates/miotemplate/css/nome-file.css Variabile diventa: JUri::base() . ‘templates/’. $this->template .’/css/nome-file.css’ Creare template per Joomla www.3rd-graphic.it QUINDI: $doc = JFactory::getDocument(); $baseurl = JUri::base() . 'templates/' . $this -> template . '/'; $doc -> addStyleSheet( $baseurl . '/css/bootstrap.min.css’ , $type = 'text/css’ , $media = 'screen,projection'); $doc-> addScript($baseurl . '/js/ekko-lightbox.min.js', 'text/javascript'); Creare template per Joomla E ORA COME CONTINUO ? QUARDA JOOMLA! I migliori esempi di template li hai fin dalla prima installazione www.3rd-graphic.it Creare template per Joomla PER LA COPIA DEL TEMPLATE MANDA UN EMAIL A: [email protected] www.3rd-graphic.it