יצירת קובץ templateDetails.xml בסיסי
מתוך ג'ומלה! ישראל - וויקי
הקובץ templateDetails.xml הוא חיוני. בלעדיו, התבנית שלך לא תראה על ידי ג'ומלה!. הקובץ מכיל "מטא-נתונים" על התבנית.
בוא נסתכל על דוגמא:
| קוד: templateDetails.xml |
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.5/template-install.dtd">
<install version="1.5" type="template">
<name>mynewtemplate</name>
<creationDate>2008-05-01</creationDate>
<author>John Doe</author>
<authorEmail>john@example.com</authorEmail>
<authorUrl>http://www.example.com</authorUrl>
<copyright>John Doe 2008</copyright>
<license>GNU/GPL</license>
<version>1.0.2</version>
<description>My New Template</description>
<files>
<filename>index.php</filename>
<filename>component.php</filename>
<filename>templateDetails.xml</filename>
<filename>template_thumbnail.png</filename>
<filename>images/background.png</filename>
<filename>css/style.css</filename>
</files>
<positions>
<position>breadcrumb</position>
<position>left</position>
<position>right</position>
<position>top</position>
<position>user1</position>
<position>user2</position>
<position>user3</position>
<position>user4</position>
<position>footer</position>
</positions>
</install>
|
אז, כפי שאתה יכול לראות, יש לנו סדרה של נתונים בין תגי סימון (<הדבר הזה>). הגישה הטובה ביותר היא לגזור ולהדביק את הקוד הזה לתוך קובץ "templateDetails.xml" משלך ולשנות את הקטעים הרלוונטיים (כגון <name> <author>).
החלק <files> צריך להכיל את כל הקבצים שבהם אתה משתמש - אתה אולי עדיין לא יודע איך הם נקראים - אל תדאג, תעדכן אותו מאוחר יותר.
השאירו את המיקומים כמו שהם - זה סדרת מיקומים נפוצה ואיתה תוכל להחליף בקלות בין תבניות סטנדרטיות.

