RSS   Twitter   Copiny   Copiny
Нашел ошибку? 

Выдели фрагмент текста с ошибкой или неточностью и нажми Ctrl+Enter!

Файлы и папки шаблона, общая структура

если кратко, то выглядит это следующим образом

По умолчанию все шаблоны сайта должны раcполагаются в директории "/templates", которая находится в корне. Допустим наш шаблон будет называться "my_template", тогда струтктура типичного шаблона, будет следующая. Для примера назовем наш шаблон "my_template". Начиная с директории

  • /templates/my_template/
    • css/ - различные файлы стилей для шаблона (например reset.css, styles.css, ie.css и т. д.)
    • html/ - папка, в которой лежат переназначеные шаблоны для модулей и компонентов системы
      • modules.php - собственные chrome-функции
      • pagination.php - шаблон для постраничной навигации
      • com_content
      • com_search
      • mod_breadcrumbs
      • mod_search
      • ... и т. д.
    • js/ - файлы сценариев JavaScript (jquery.js, mootools.js, scripts.js)
    • images/ - картинки, необходимые для правильного отображения дизайна сайта
    • php/ - дополнительные файлы php
    • component.php - шаблон версии для печати
    • error.php - шаблон вывода фатальных ошибок
    • index.html - заглушка
    • *index.php - основной шаблон с разметкой всех блоков
    • offline.php - шаблон для отключенного сайта
    • params.ini - файл с текущими настройками (только для J!1.5)
    • raw.php - пустой шаблон, необходим для ajax
    • template_thumbnail.png - миниатюрный скриншот шаблона
    • *templateDetails.xml - метаданые шаблона (название, настройки, лицензия, авторство, описание и т. д.)

Элементы отмеченые звездочкой (*) обязательны для работы шаблона (для его минимального функционала).

а теперь обо всем подробно и по порядку

Шаблон должен быть сохранен в определенной структуре каталогов:

/templates/<имя_шаблона>/
/templates/<имя_шаблона>/css/
/templates/<имя_шаблона>/images/
/templates/<имя_шаблона>/js/
/templates/<имя_шаблона>/html/

Имя шаблона не может содержать пробелов и других специальных символов. Рекомендуем называть шаблон строчными латинскими буквами. В зависимости от операционной системы, экзотические комбинации символов могут стать главной причиной массы проблем. В добавок имя должно быть осмысленным. Здесь в качестве имени шаблона выбрано "my_template".

В каталогах шаблона должны быть представлены различные файлы с предопределенными именами. Вот основные из них:

 

Основной файл разметки. Это HTML-файл

/templates/my_template/index.php

Он должен заканчиваться на ".php", поскольку элементы динамического модуля Joomla должны интерпретироваться РНР.

 

Изображение предварительного просмотра. Файл картинки

/templates/my_template/template_thumbnail.png

содержит изображение предварительного просмотра вашего шаблона, которое предназначено для предпросмотра в менеджере шаблонов. Изображения предварительного просмотра имеют тип-png размером примерно 200x150 пикселей. Вы можете создать этот файл позднее, когда увидите готовый шаблон.

 

Метаданные шаблона.

/templates/my_template/templateDetails.xml

Файл представляет техническое руководство для инсталлятора шаблонов и содержит инсталляции для выбора шаблона в диспетчере шаблонов. Здесь вы специфицируете место, куда должны копироваться файлы, кто их автор, а также дополнительные метаданные о шаблоне. Во время последующей инсталляции этого файла инсталлятором Joomla, РНР читает его и копирует файлы в места, специфицированные XML-файлом. Для каждого файла, который применяется в шаблоне, соответствующий контейнер XML должен быть наполнен именем файла и корректным путем.

 

CSS-файлы. Для разрабатываемого шаблона можно использовать несколько CSS-файлов. Какое имя вы дадите файлу CSS, и как создадите его — дело ваше. Однако для разных элементов CSS предусмотрены разные каталоги. Для первой попытки вам понадобится CSS-файл по имени /templates/my_template/css/template.css.

 

Графика, изображения, флеш. Здесь можно ввести определенные пользователем файлы изображений, которые понадобятся в шаблоне для дизайна. Инсталлятор затем скопирует эти файлы в папку images. Имя файла выглядит как

/templates/my_template/images/[определенный_пользователем_файл_изображения]

 

Версия для печати. Шаблон версии для печати для компонента.

/templates/my_template/component.php

 

Файл хранения настроек шаблона. (только для J!1.5) Через файл templateDetails.xml можно указать свои настройки. После сохранения настроек через Менеджер шаблонов, в папке появится файл

/templates/my_template/params.ini

 

Шаблон offline-страницы. Если сайт отключен через панель управления, то отобразиться именно этот шаблон.

/templates/my_template/offline.php

Смотрите также:
Комментарии (34) Добавить комментарий
  • I Need Help Writing My Personal Statement
    I Need Help Writing My Personal Statement
    19 Февраля 2018, 06:12
     ↑  0  ↓     ответ

    Very rapidly this site will be famous among all blog viewers, due to it's fastidious

    content

  • Сan You Write an Essay in One Day
    Сan You Write an Essay in One Day
    19 Февраля 2018, 07:35
     ↑  0  ↓     ответ

    Wonderful article! That is the type of information that are supposed to be shared across the web.

    Disgrace on Google for not positioning this put up higher!

    Come on over and seek advice from my site .

    Thank you =)

  • People Who Do Homework for Money
    People Who Do Homework for Money
    07 Марта 2018, 21:11
     ↑  0  ↓     ответ

    Wow, this article is nice, my sister is analyzing these things,

    therefore I am going to inform her.

  • The Easiest Way to Write an Essay
    The Easiest Way to Write an Essay
    08 Марта 2018, 05:54
     ↑  0  ↓     ответ

    I know this website provides quality depending posts and

    other information, is there any other site which offers these kinds of data in quality?

  • Where Can I Find Someone to Write My College Paper
    Where Can I Find Someone to Write My College Paper
    08 Марта 2018, 08:05
     ↑  0  ↓     ответ

    Thanks for sharing your thoughts about Файлы и папки шаблона.

    Regards

  • Сan You Write an Essay in One Day
    Сan You Write an Essay in One Day
    10 Марта 2018, 21:18
     ↑  0  ↓     ответ

    I don't even know how I ended up here, but I thought this post was good.

    I don't know who you are but certainly you are going to a famous

    blogger if you are not already ;) Cheers!

  • come vestire i giovani se sei in sovrappeso
    come vestire i giovani se sei in sovrappeso
    15 Марта 2018, 13:23
     ↑  0  ↓     ответ

    Greetings! Very helpful advice within this

    article! It is the little changes that make the greatest changes.

    Thanks a lot for sharing!

  • Anti Assignment Clause Examples
    Anti Assignment Clause Examples
    23 Марта 2018, 17:18
     ↑  0  ↓     ответ

    This piece of writing is truly a good one it assists new net visitors,

    who are wishing in favor of blogging.

  • minecraft
    minecraft
    06 Сентября 2018, 14:49
     ↑  0  ↓     ответ

    Its like you learn my thoughts! You appear to

    grasp so much approximately this, such as you wrote the e-book in it or something.

    I feel that you just could do with some % to pressure the message house a little bit, but instead of that, that

    is magnificent blog. A great read. I will certainly be back.

  • minecraft
    minecraft
    07 Сентября 2018, 22:04
     ↑  0  ↓     ответ

    I'm impressed, I must say. Rarely do I come across

    a blog that's both educative and amusing, and without a doubt, you have hit the nail on the head.

    The issue is something that too few folks are

    speaking intelligently about. I am very happy I came across this during my search for something relating to this.

  • minecraft
    minecraft
    08 Сентября 2018, 12:07
     ↑  0  ↓     ответ

    This is really interesting, You're a very skilled blogger.

    I have joined your feed and look forward to seeking more of

    your fantastic post. Also, I have shared your site in my social

    networks!

  • minecraft
    minecraft
    10 Сентября 2018, 02:56
     ↑  0  ↓     ответ

    Awesome post.

  • minecraft
    minecraft
    10 Сентября 2018, 14:59
     ↑  0  ↓     ответ

    I like the helpful information you supply for your articles.

    I will bookmark your weblog and take a look at again right here frequently.

    I am slightly certain I will be told plenty of new stuff proper here!

    Best of luck for the next!

  • minecraft
    minecraft
    12 Сентября 2018, 03:44
     ↑  0  ↓     ответ

    Hello this is kind of of off topic but I was wanting to

    know if blogs use WYSIWYG editors or if you have to manually code with HTML.

    I'm starting a blog soon but have no coding expertise so

    I wanted to get guidance from someone with experience.

    Any help would be greatly appreciated!

  • minecraft
    minecraft
    12 Сентября 2018, 14:13
     ↑  0  ↓     ответ

    Every weekend i used to visit this web site, for the reason that i wish for enjoyment, as this this web

    page conations in fact good funny material too.

  • minecraft
    minecraft
    14 Сентября 2018, 06:34
     ↑  0  ↓     ответ

    Magnificent site. A lot of helpful info here. I am sending it to several buddies ans also sharing in delicious.

    And obviously, thank you for your effort!

  • minecraft
    minecraft
    15 Сентября 2018, 08:09
     ↑  0  ↓     ответ

    Please let me know if you're looking for a article writer for your weblog.

    You have some really great posts and I think I would be a good asset.

    If you ever want to take some of the load off, I'd really like to write some articles for your blog in exchange for a link back

    to mine. Please blast me an email if interested.

    Many thanks!

  • minecraft
    minecraft
    16 Сентября 2018, 10:18
     ↑  0  ↓     ответ

    Great post. I am going through a few of these issues as well..

  • minecraft
    minecraft
    17 Сентября 2018, 07:45
     ↑  0  ↓     ответ

    Hello, always i used to check weblog posts here

    early in the dawn, because i like to gain knowledge of more and more.

  • minecraft
    minecraft
    20 Сентября 2018, 16:32
     ↑  0  ↓     ответ

    Hey there! I know this is kinda off topic but I was wondering if you knew where I could find a

    captcha plugin for my comment form? I'm using the same

    blog platform as yours and I'm having trouble finding one?

    Thanks a lot!

  • minecraft
    minecraft
    22 Сентября 2018, 23:50
     ↑  0  ↓     ответ

    You really make it seem really easy together with your presentation but

    I to find this topic to be really something that I think I would never understand.

    It seems too complex and extremely huge for me. I'm looking forward for your next

    submit, I'll try to get the hang of it!

  • minecraft
    minecraft
    27 Сентября 2018, 12:05
     ↑  0  ↓     ответ

    Truly when someone doesn't be aware of after that its

    up to other users that they will assist, so here it takes place.

  • minecraft
    minecraft
    28 Сентября 2018, 09:51
     ↑  0  ↓     ответ

    It's really very complex in this active life to listen news on TV, so

    I simply use internet for that purpose, and get the

    newest news.

  • minecraft
    minecraft
    30 Сентября 2018, 03:22
     ↑  0  ↓     ответ

    I simply could not go away your site prior to suggesting that I actually loved the usual information a person provide on your guests?

    Is gonna be again often in order to investigate cross-check new posts

  • Free Online Dating
    Free Online Dating
    07 Октября 2018, 02:41
     ↑  0  ↓     ответ

    WOW just what I was looking for. Came here by searching for Файлы и

    папки шаблона

  • Free Online Dating
    Free Online Dating
    08 Октября 2018, 10:30
     ↑  0  ↓     ответ

    I for all time emailed this blog post page to all my associates, because if like to read it afterward

    my friends will too.

  • Free live cams
    Free live cams
    15 Октября 2018, 11:40
     ↑  0  ↓     ответ

    Are you looking to see and talk to some really sexy girls?

    These girls are super dirty and it doesn’t cost a single

    cent to talk to them. It’s wall to wall babes at this site.

    Just visit https://t.irtyc.com/cvezzegjk?aff_id=29696&offer_id=3664&bo=2779,2778,2777,2776,3391 and sign up for your free account.

    You’ll be talking to these total babes in a matter of no time flat!

  • Crashing Seasons 1-2 dvd Australia
    Crashing Seasons 1-2 dvd Australia
    22 Октября 2018, 09:51
     ↑  0  ↓     ответ

    I've been surfing online more than 3 hours today,

    yet I never found any interesting article like yours.

    It is pretty worth enough for me. In my opinion,

    if all web owners and bloggers made good content as you did,

    the web will be a lot more useful than ever before.|

    I couldn't refrain from commenting. Very well written!|

    I'll immediately grasp your rss feed as I

    can't in finding your e-mail subscription hyperlink

    or newsletter service. Do you've any? Please allow

    me know so that I may subscribe. Thanks.|

    It is appropriate time to make some plans for the future and it's time

    to be happy. I have read this post and if I could I wish to suggest you some interesting things or tips.

    Maybe you could write next articles referring to this article.

    I desire to read more things about it!|

    It's the best time to make a few plans for the long

    run and it is time to be happy. I have read this publish and if I

    could I wish to counsel you few interesting issues

    or suggestions. Perhaps you could write subsequent articles referring to

    this article. I want to learn more issues approximately it!|

    I have been surfing online more than 3 hours lately, but I never discovered any attention-grabbing article like yours.

    It is pretty price sufficient for me. In my view, if all website owners and bloggers made good content as you did, the internet might be a lot more useful than ever before.|

    Ahaa, its nice discussion concerning this piece of writing at this place at this weblog, I have

    read all that, so now me also commenting at this place.|

    I am sure this piece of writing has touched all the internet viewers, its

    really really fastidious post on building

    up new web site.|

    Wow, this article is nice, my sister is analyzing such

    things, thus I am going to tell her.|

    bookmarked!!, I love your website!|

    Way cool! Some extremely valid points! I appreciate you writing

    this article and the rest of the website is really good.|

    Hi, I do think this is a great site. I stumbledupon it ;) I will come back once again since I bookmarked it.

    Money and freedom is the greatest way to change, may you be rich and continue to guide other people.|

    Woah! I'm really digging the template/theme of this site.

    It's simple, yet effective. A lot of times it's very difficult to get that "perfect balance" between superb usability and visual appeal.

    I must say that you've done a very good job with this.

    Also, the blog loads super fast for me on Chrome. Outstanding Blog!|

    These are actually great ideas in regarding blogging. You have touched some

    pleasant points here. Any way keep up wrinting.|

    Everyone loves what you guys are up too. This sort of clever work and reporting!

    Keep up the superb works guys I've added you guys to my blogroll.|

    Hey there! Someone in my Facebook group shared this site with us so I came to check it out.

    I'm definitely loving the information. I'm book-marking and will be tweeting this to my followers!

    Wonderful blog and amazing design and style.|

    I like what you guys are usually up too. Such clever work

    and coverage! Keep up the very good works guys I've added

    you guys to my personal blogroll.|

    Hi there would you mind sharing which blog platform you're working with?

    I'm planning to start my own blog in the near future but I'm having a difficult

    time making a decision between BlogEngine/Wordpress/B2evolution and Drupal.

    The reason I ask is because your design seems different then most blogs and I'm looking

    for something unique. P.S Apologies for being off-topic but I had to

    ask!|

    Hey would you mind letting me know which web host you're utilizing?

    I've loaded your blog in 3 completely different browsers and I must say this blog loads a lot faster then most.

    Can you suggest a good hosting provider at a honest price?

    Many thanks, I appreciate it!|

    Everyone loves it whenever people come together and share views.

    Great blog, keep it up!|

    Thank you for the auspicious writeup. It in fact was a amusement

    account it. Look advanced to more added agreeable from you!

    However, how could we communicate?|

    Hey there just wanted to give you a quick heads up.

    The words in your article seem to be running off the screen in Internet explorer.

    I'm not sure if this is a format issue or something to do

    with web browser compatibility but I figured I'd post to let you

    know. The design look great though! Hope you

    get the problem resolved soon. Kudos|

    This is a topic that's close to my heart... Thank you! Where are your contact details though?|

    It's very effortless to find out any topic on net as compared to books, as I found this piece of

    writing at this web site.|

    Does your blog have a contact page? I'm having trouble locating it but, I'd like to send you an e-mail.

    I've got some recommendations for your blog you might be interested in hearing.

    Either way, great site and I look forward to seeing it develop over time.|

    Hello! I've been reading your website for some time now and finally got the bravery to go ahead and give you a shout out from Austin Texas!

    Just wanted to mention keep up the good work!|

    Greetings from Los angeles! I'm bored to tears at work so I decided to browse

    your blog on my iphone during lunch break. I really like the info you provide here and can't

    wait to take a look when I get home. I'm amazed at how fast your blog loaded

    on my phone .. I'm not even using WIFI, just 3G .. Anyways, very good blog!|

    Its like you read my mind! You seem to know a lot about this, like you wrote the

    e book in it or something. I feel that you can do with some percent to pressure the

    message house a bit, but instead of that,

    that is great blog. A fantastic read. I will definitely be back.|

    I visited several web pages however the audio feature for audio songs current

    at this web page is in fact excellent.|

    Hi there, i read your blog from time to time and i own a similar one and i was just

    curious if you get a lot of spam comments? If so how do you protect against it, any plugin or anything you can suggest?

    I get so much lately it's driving me crazy so any help is very much appreciated.|

    Greetings! Very useful advice in this particular article! It is the little changes that will make the

    most important changes. Thanks for sharing!|

    I truly love your site.. Great colors & theme. Did you create this web site yourself?

    Please reply back as I'm trying to create my own personal blog and would like to know where you got this

    from or exactly what the theme is called. Thank you!|

    Hi there! This article could not be written much better!

    Going through this article reminds me of my previous roommate!

    He constantly kept talking about this. I am going to forward this information to him.

    Fairly certain he'll have a great read. I appreciate you for sharing!|

    Incredible! This blog looks just like my old one!

    It's on a entirely different topic but it has pretty much the same layout and design. Outstanding choice of colors!|

    There's certainly a lot to know about this issue.

    I really like all of the points you made.|

    You've made some decent points there. I checked on the net to find out more about the

    issue and found most individuals will go along with your views

    on this web site.|

    What's up, I log on to your blogs daily. Your story-telling style

    is awesome, keep up the good work!|

    I just could not depart your site before suggesting that I

    actually loved the usual information a person supply in your visitors?

    Is gonna be again frequently to check out new posts|

    I want to to thank you for this fantastic read!! I certainly loved every little

    bit of it. I have got you book-marked to check out new stuff you post…|

    What's up, just wanted to say, I loved this post.

    It was helpful. Keep on posting!|

    Hello, I enjoy reading through your article post. I wanted to write a little comment to

    support you.|

    I every time spent my half an hour to read this website's articles daily along with a

    cup of coffee.|

    I always emailed this blog post page to all my associates, since if like to read it then my contacts will too.|

    My developer is trying to convince me to move to .net from PHP.

    I have always disliked the idea because of the costs.

    But he's tryiong none the less. I've been using

    WordPress on various websites for about a year and am worried about switching

    to another platform. I have heard good things about blogengine.net.

    Is there a way I can transfer all my wordpress content into

    it? Any kind of help would be really appreciated!|

    Hello! I could have sworn I've been to this blog before but after looking at a few of the posts

    I realized it's new to me. Nonetheless, I'm definitely

    delighted I stumbled upon it and I'll be book-marking it and checking back

    regularly!|

    Wonderful article! This is the type of info that should be shared across the

    net. Shame on Google for not positioning this put up higher!

    Come on over and discuss with my site . Thank you =)|

    Heya i am for the first time here. I found

    this board and I find It truly useful & it helped me out a lot.

    I hope to give something back and help others like you aided me.|

    Hello, I believe your blog might be having internet browser compatibility problems.

    Whenever I take a look at your blog in Safari, it looks fine however, when opening in IE,

    it's got some overlapping issues. I simply wanted to give you a quick heads up!

    Other than that, great website!|

    Someone essentially help to make seriously articles I'd state.

    That is the very first time I frequented your website page and to this point?

    I surprised with the research you made to create this particular

    put up amazing. Wonderful job!|

    Heya i am for the primary time here. I found this board and I to find

    It really helpful & it helped me out a lot. I hope to provide something again and help others such

    as you aided me.|

    Howdy! I simply wish to offer you a big thumbs up

    for your excellent information you've got here on this post.

    I'll be coming back to your site for more soon.|

    I always used to read post in news papers but now as I am a user of

    internet so from now I am using net for content, thanks to web.|

    Your method of explaining everything in this paragraph is

    in fact pleasant, every one can simply be aware of it,

    Thanks a lot.|

    Hi there, I discovered your website by the use of Google at the same

    time as searching for a similar matter, your site got here

    up, it appears to be like great. I've bookmarked it in my google bookmarks.

    Hi there, just was aware of your blog via Google, and found that it's really informative.

    I'm going to watch out for brussels. I'll be grateful in case

    you proceed this in future. Lots of people can be benefited from your

    writing. Cheers!|

    I'm curious to find out what blog platform you happen to be using?

    I'm experiencing some small security problems with my latest site and I'd like to find

    something more safeguarded. Do you have any recommendations?|

    I am extremely impressed with your writing skills and also with

    the layout on your weblog. Is this a paid theme or did you modify it yourself?

    Either way keep up the excellent quality writing, it is rare to see a great blog

    like this one nowadays.|

    I'm really inspired together with your writing abilities and also with the format on your

    blog. Is this a paid theme or did you customize it your

    self? Anyway keep up the excellent quality writing, it's uncommon to peer a great weblog like this

    one nowadays..|

    Hi, Neat post. There is a problem together with your site in internet explorer,

    would check this? IE still is the market chief and a good section of

    other folks will leave out your wonderful writing because of this problem.|

    I'm not sure where you're getting your information, but great topic.

    I needs to spend some time learning more or understanding

    more. Thanks for wonderful information I was looking for this info for my mission.|

    Hello, i think that i saw you visited my blog thus i came

    to “return the favor”.I'm attempting to find things to improve

    my web site!I suppose its ok to use a few of \

  • Free auto approve list 10-17-2018
    Free auto approve list 10-17-2018
    23 Октября 2018, 09:36
     ↑  0  ↓     ответ

    There’s been a lot of changes since I last left

    a comment about my site. I’m starting to

    add the new features that I’ve wanted to. I hope in the next few weeks that all of it

    will be up and running. It’s going to take time and I haven’t had much of it to

    dedicate to this project. I thank you all for visiting my site and I hope you have a great weekend!

  • Free auto approve list 10-17-2018
    Free auto approve list 10-17-2018
    24 Октября 2018, 15:47
     ↑  0  ↓     ответ

    There’s been a lot of changes since I last

    left a comment about my site. I’m starting to add the new

    features that I’ve wanted to. I hope in the next few weeks that all

    of it will be up and running. It’s going to take time and I haven’t had much of it to dedicate to this project.

    I thank you all for visiting my site and I hope you have a great weekend!

  • wildtequilla
    wildtequilla
    07 Ноября 2018, 10:40
     ↑  0  ↓     ответ

    Every guy needs to know a cam girl like camgirl.pw/wildtequilla/ She

    is a doll. You’ll have a whole lot of fun with any girl at

    this site. The type of fun that will put a smile on your face for days

    to come.

  • Ariana Grande Thank U
    Ariana Grande Thank U
    09 Ноября 2018, 09:03
     ↑  0  ↓     ответ

    Have you heard Ariana Grande perform Thank U live? If not, then you’ve definitely

    got to hear it. Give it a listen by clicking here kudoflow.com/4Emv This might just be her best song ever!

  • wildtequilla
    wildtequilla
    10 Ноября 2018, 21:25
     ↑  0  ↓     ответ

    Every guy needs to know a cam girl like camgirl.pw/wildtequilla/ She is a doll.

    You’ll have a whole lot of fun with any girl at this site.

    The type of fun that will put a smile on your face for days to come.

  • Get Paid To Take Surveys
    Get Paid To Take Surveys
    11 Ноября 2018, 20:17
     ↑  0  ↓     ответ

    Make some extra cash or even a full-time income taking surveys.

    You don’t need to leave your house to make this money.

    Check out all the details simply by visiting this site kudoflow.com/5eFZ

Оставить комментарий




* обязательно для заполнения

1 введенный почтовый адрес используется только для обратной связи при ответах в комментариях и сервиса gravatar.com
.