Création de template

More
11 years 2 months ago #33589 by V@lentine
Bonjour,

Je cherche a créer un template perso, et en parcourant ce forum je suis tombé sur le tuto de netasso blog.netassopro.com/tutoriel-tem ... structure/ qu'il me semble avoir suivi à la lettre.
J'ai donc créé les fichiers xml, php et css nécessaire pour la vue item dans un premier temps.
De retour dans l'admin des templates, je voyais bien mon template "formation" mais pas d'icone sous item layout, ni moyen de lier mon typ à ce template.
J'ai alors fait une copie du template "blog" et j'ai recréé les éléments liés à la vue item comme précédement. Ce coup-ci j'ai mon icone "item layout" et je peux lier mon type.
Par contre quand je vais dans "item layout" je ne vois pas les zones que j'ai créées dans les fichiers xml et php et l'auteur est toujours celui de la vue blog !
Et dans le tuto de netasso, il indique en partie 2 qu'il y a juste à glisser les champs dans les zones, donc je ne parviens pas à m'expliquer pourquoi mes zones ne sont pas visibles et surtout pourquoi celles du template "blog" le sont toujours alors que je les ai supprimées (et vidage du cache).

Fichier XML :
Code:
<?xml version="1.0" encoding="utf-8"?> <form> <author>Mon nom</author> <website>monsite.fr</website> <email>monmail@monsite.fr</email> <license>GPLv2</license> <version>1.0</version> <release>15 fev. 2013</release> <description>Template pour afficher les formations</description> <fieldgroups> <group>titre</group> <group>nouveau</group> <group>sous_titre</group> <group>sanction</group> <group>logos_partenaires</group> <group>public</group> <group>objectifs</group> <group>detail</group> <group>infos</group> </fieldgroups> <cssitem> <file>css/item.css</file> </cssitem> <jsitem> </jsitem> </form>
y a-t-il d'autres fichiers à modifier ?
J'ai supprimé tous les autres justement...

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #33594 by micker
Replied by micker on topic Création de template
attention vraiment important il faut cleaner le cache apres toute modification dans le code template (surtout xml) pour voir les positions... apres c'est pas clair ton histoire ...
1 tu duplique le template blog depuis l'admin
2 ca te créer un dossier dans com_flexicontent/template/lenomdetontemplate
3 edite tes xml pour les positions
4 edite item.php et categorie_item.php
5 lie ton template a ton type
6 lie ton template a ta categorie
7 deplace tes champs dans les positions
clean les caches souvent pour travailler
a+

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #34524 by V@lentine
Replied by V@lentine on topic Création de template
Merci pour votre réponse j'ai réussi à créer mon template en partant de l'admin, et ça a fonctionné.
J'ai bien avancé mais seulement depuis la semaine dernière, ce qui explique que mes remerciements arrivent un mois après !!

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #34547 by micker
Replied by micker on topic Création de template
avec plaisir

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #43916 by m.raulin
Replied by m.raulin on topic Création de template
Bonjour,

je viens de dupliquer le template défault, j'ai modifié les positions dans le fichier item.xml.
mais je ne comprend pas ce que je dois faire dans les fichiers item.php et category_items.php.

Je souhaite créer une page : style pole emploi pour visualiser les offres d'emploi .

je vous remercie

Cdlt

Magali

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #43918 by ggppdk
Replied by ggppdk on topic Création de template
Hello

- (ITEM VIEW) If you added position inside the item.xml
the you need to edit:
item.php and item_html5.php
in order to add the PHP code that displays the position

- (CATEGORY VIEW) If you added position inside the item.xml
the you need to edit:
category_items.php and category_items_html5.php
in order to add the PHP code that displays the position


The position can be added by copy / pasting an existing position:
e.g.
<?php if (isset($item->positions)) : ?>
<!-- BOF subtitle2 block -->
...
<!-- EOF subtitle2 block -->
<?php endif; ?>


and changing 'subtitle2' to 'my_new_position_name'

-- Before you do the above in item.php, please do what the comment inside the file asks you , replace existing code of item.php with the code from
components/com_flexicontent/tmpl_common/item_layouts/modular.php

and NOTE you need some HTML/PHP knowledge to do the above, otherwise please use only the built-in template position and parameters
Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.630 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline