[phpWebApp-commits] CVS: documentation/templates/tutorial templates.html,1.1,1.2 transitions.html,1.
Brought to you by:
dashohoxha
|
From: Dashamir H. <das...@us...> - 2001-12-27 05:30:38
|
Update of /cvsroot/phpwebapp/documentation/templates/tutorial
In directory usw-pr-cvs1:/tmp/cvs-serv1454/templates/tutorial
Modified Files:
templates.html transitions.html
Log Message:
Index: templates.html
===================================================================
RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/templates.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** templates.html 2001/12/16 05:47:05 1.1
--- templates.html 2001/12/27 05:30:35 1.2
***************
*** 1,4 ****
<h3>2 - Templates</h3>
! The HTML files now become templates. This application
uses the <Include> tag to insert the same header file
at the beginning of each template and to break the
--- 1,5 ----
+ <script language="JavaScript" src="{{./}}codeReview.js"></script>
<h3>2 - Templates</h3>
! Explains templates. This application
uses the <Include> tag to insert the same header file
at the beginning of each template and to break the
***************
*** 9,20 ****
Explains how to debug the template structure.
<br><br>
! [<a href="javascript: alert('Sorry! Not implemented yet.')">Test</a>]
! [<a href="javascript: alert('Sorry! Not implemented yet.')">Browse</a>]
<br><br>
<hr>
! <br>
<ul>
! <li>
! <li>
! <li>
! </ul>
\ No newline at end of file
--- 10,123 ----
Explains how to debug the template structure.
<br><br>
! [<a href="/app2/" target="_new">Test</a>]
! [<a href="/app2/browse.php" target="_new">Browse</a>]
! [<a href="/download/app2.tar.gz">Download</a>]
<br><br>
<hr>
! <a name="toc">
! <h4>Table of Contents</h4>
<ul>
! <li><a href="#templates">Templates</a>
! <li><a href="#variables">Template Variables</a>
! <li><a href="#include">The <Include> tag</a>
! <li><a href="#comments">Comments</a>
! <li><a href="#including">JavaScript code and stylesheet of a template</a>
! <li><a href="#exercises">Exercises</a>
! </ul>
!
! <hr>
! <a name="templates"></a>
! <h4>Templates</h4>
! <p>
! Templates are pieces of HTML code, that are used or combined
! by the framework to generate the HTML pages that are sent to
! the browser.
! </p>
!
! [<a href="#toc">TOC</a>]
! <hr>
!
! <a name="variables"></a>
! <h4>Template variables</h4>
! <p>
! The templates may contain variables inside them (called "template variables"),
! which are replaced by the framework with their string values. The variables
! inside a template are denoted by double curly braces: {{tpl_var}}.
! </p>
!
! [<a href="#toc">TOC</a>]
! <hr>
!
! <a name="include"></a>
! <h4>The <Include> tag</h4>
! <p>
! The templates may also contain some extra tags, which are not HTML tags.
! These tags are reckognised and processed by the framework. One of them is
! the <Include> tag, which is used to include another template inside the
! current template:
! </p>
! <pre>
! <Include SRC="file_to_be_included" />
! </pre>
! <p>
! It is a very useful tag, because it allows to separate
! pages into subtemplates, which results in a better structured application,
! provides modularity (the graphical designer can work with smaller pieces of
! code), and reusability (templates are easier to be reused in other pages
! or other applications).
! </p>
!
! [<a href="#toc">TOC</a>]
! <hr>
!
! <a name="comments"></a>
! <h4>Comments</h4>
! <p>
! The templates may contain some special comments as well:
! </p>
! <pre>
! <!--# Framework comments #-->
! </pre>
! <p>
! These comments are like HTML comments by they have a diesis (#)
! at the opening and closing marks. These comments are not processed
! by the framework and are not displayed in the HTML page that is generated.
! </p>
!
! [<a href="#toc">TOC</a>]
! <hr>
!
! <a name="including"></a>
! <h4>JavaScript code and stylesheet of a template</h4>
! <p>
! If a certain template has some javascript code or some special styles
! of its own, then it is better to include them at the begining of the
! template (instead of including them globally, at the header of the page).
! This makes the template more independant from the other parts of the page
! and thus easier to use it again into another page. They are included like
! this:
! </p>
! <pre>
! <script language="javascript" src="file.js"></script>
! <link rel="stylesheet" type="text/css" href="file.css">
! </pre>
! <p>
! The inclusion is much better than writting the JS and CSS code in the
! template because it separates the HTML code from the JS and CSS codes.
! It also is more efficient (has a better performance) because the next
! time that this template is loaded in browser again, most probably the
! browser will get "file.js" and "file.css" from the cache, instead of
! retrieving them again from the server.
! </p>
!
! [<a href="#toc">TOC</a>]
! <hr>
!
! <a name="exercises">
! <h4>Exercises</h4>
! <p>
! </p>
!
! [<a href="#toc">TOC</a>]
! <hr>
!
Index: transitions.html
===================================================================
RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/transitions.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** transitions.html 2001/12/23 17:06:11 1.4
--- transitions.html 2001/12/27 05:30:35 1.5
***************
*** 11,14 ****
--- 11,15 ----
[<a href="/app1/" target="_new">Test</a>]
[<a href="/app1/browse.php" target="_new">Browse</a>]
+ [<a href="/download/app1.tar.gz">Download</a>]
<br><br>
<hr>
|