Андрей Posted August 8, 2013 Share Posted August 8, 2013 Как правильно использовать назначение шаблонов, какой должна быть структура кода,привязка и взаимодействие с новыми модулями, чтобы не возникло проблем с путями назначений , какой метод разработки использовать? head.inc _out.php As it is correct to use the purpose a pattern, what must be a structure of the code,привязка and interaction with new module to did not appear the problems with fetter of the purposes , what method of the development to use? head.inc _out.php Link to comment Share on other sites More sharing options...
adrian Posted August 8, 2013 Share Posted August 8, 2013 There are several different, and no "correct" way of structuring a site in PW. The default profile uses head.inc and foot.inc, the skyscraper demo makes use of the _init.php and _out.php files, as set in the config.php file. Some people use one main.inc file that contains all the framework HTML etc. Each template populates content to a variable (eg: $out), which is then echo inside the appropriate content div in the main.inc file. Here is a discussion about a different approach altogether: http://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ Lots of options and it really comes down to what makes most sense to you. 1 Link to comment Share on other sites More sharing options...
Андрей Posted August 8, 2013 Author Share Posted August 8, 2013 head.inc and foot.inc неудобно редактор не показывает разметку во время редактирования. head.inc and foot.inc uncomfortably editor does not show sectoring during editing Link to comment Share on other sites More sharing options...
adrian Posted August 8, 2013 Share Posted August 8, 2013 I just ran your Russian through Google translate in an attempt to better understand your question. "sectoring" was changed to "markup". Sorry if I am still not understanding, but I am wondering if you are familiar with PHP? Your editor won't show what the final page will look like because it is a server-side language that creates the final HTML which is what is then displayed on the site. If I am not understanding, perhaps you could try a more detailed question - perhaps some more details will give us a better chance of understanding the translated text. Link to comment Share on other sites More sharing options...
Андрей Posted August 8, 2013 Author Share Posted August 8, 2013 файл с расширение ****.php обычно <?php?> обозначается красным цветом "text/javascript" синим <a href= зеленым файл с расширение****.inc не разделяет на цвета структуру кода трудно во множественном коде искать то ,что нужно бывает происходят ошибки, большой беды в этом нет file with expansion****.php <?php?> is marked by red colour "text/javascript" blue <a href= green file with expansion****.inc does not divide into colour structure code it is difficult in plural code to search that it is necessary can be occur errors, big trouble in this no Link to comment Share on other sites More sharing options...
adrian Posted August 8, 2013 Share Posted August 8, 2013 Now I think I understand your question It sounds like your editor isn't styling your code as PHP because of the .inc name. It must rely on the file extension to decide how to color the code. You could easily rename these files with a .php extension. The .inc is not necessary for them to work. Otherwise there are other code editors out there that will style the php sections of a .inc file correctly. SublimeText is one example that I am familiar with, but I am sure lots of others do as well. Also, there might be a configuration option in your editor to set the styling of .inc files to php. Hope that helps. 1 Link to comment Share on other sites More sharing options...
Андрей Posted August 8, 2013 Author Share Posted August 8, 2013 Спасибо!!! Thank you !!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now