[ Pobierz całość w formacie PDF ]
.Dreamweaver Templates are files that end with a.dwt extension and are used by Dreamweaver to allow multiple web pages to use an identical design but contain different content and allow design changes to be applied to all pages that use the dwt.In-link Templates are files that end in a.tpl extension and are used be In-link to format the information from the In-link engine for presentation to a user.Throughout the Dreamweaver integration chapter, Dreamweaver Templates will be referred to as dwts and In-link Templates will be referred to as tpls to avoid confusion.Understanding Dreamweaver TemplatesThis section is meant only as a brief introduction to the dwt file format—if further information is required, please consult the Dreamweaver help file.Dreamweaver's template system consists on standard HTML with special HTML comments that Dreamweaver recognizes as editable sections in the format of <!-- #BeginEditable "templateName" --> and <!-- #EndEditable -->.When edited within Dreamweaver, the only section of the page that is editable is the text/code between the editable opening and closing tags.When a change is made to a dwt that other HTML files use, that change is applied to those HTML files as well.It is important to emphasize that the full code is present the HTML file—it is not linked to the dwt in any way other than the editable section tags.Understanding Macromedia Dreamweaver Library ItemsThis section is meant only as a brief introduction to the lbi file format—if further information is required, please consult the Dreamweaver help file.The limitation to Dreamweaver's template system is that all pages look the same sans the content.If a developer wanted to add an element (e.g.a navbar, a login box, copyright information) to some of the pages that use a certain dwt, but not all of the pages that use that dwt, he/she would have to add this information manually.If the developer then needed to make a change to that element, he/she would have to change each element manually.To overcome this limitation, Macromedia introduced Library Items (.lbi).Library Items contain a code segment that may be inserted into an HTML page (regardless if the page is based off a dwt or not) and remains easily updateable via Dreamweaver's update engine.Library items contain only a code segment, when applied in a web page, they contain that code segment surrounded by <!-- #BeginLibraryItem "/path/to/library/folder/libraryFileName.lbi” --> and <!-- #EndLibraryItem -->.When an lbi is edited within Dreamweaver, all pages using that lbi are updated to reflect the changes made to the lbi.Throwing tpls Into the dwt lbi MixWhen creating Dreamweaver-based tpls, though you are still creating tpl files—the content is wholly based on dwts and lbis.Rather than having a header and footer to establish a similar look to all your pages, you now use one (or more, if multiple page styles are needed) dwt to set the style of the pages.Rather than having a tpl file for elements that are not integrated into the dwt, you now have lbis that are integrated into you tpls and/or dwts.Using a lbi in a dwt can have undesired effects and is only recommended for advanced users.Dreamweaver tpl Creation/Utilization WalkthroughYou've configured the Extensions.txt file, and now you want to start your first Dreamweaver tpl theme set—so now what?Creating a new Dreamweaver SiteStart by creating a new site within Dreamweaver that will contain only the tpls and other connected files (css, js, gif, jpg, etc.).lOpen the Site window if it is not already open.llSelect Site->New Site… from the menu.llUnder Local Info, Select a Site Name, the Local Root Folder that will contain your tpls, and the HTTP Address that the theme will be running on.All other settings are up to the developer's preferences.lCreating the main dwtWe want one standard design for our theme, thus we will only create one dwt—however, the developer may choose to use as many dwts as he/she sees fit.lSelect File->New Window from the menu on the Site window.llCreate the desired design for your theme (including any In-tags you want displayed on all pages that use the dwt) in the new window.In most cases if you are changing from standard tpls to Dreamweaver tpls, the dwt you just created will simply be the summation of the header and footer with the addition of a few editable regions.llSave your file as a dwt by selecting File->Save as Template from the menu.llAdd desired editable regions to the dwt by selecting Modify->Templates->New Editable Region from the menu.Name your new region (it is suggested that you only use alphanumeric characters for the region name for easier code editing).llIn addition to the editable regions you specified, one additional editable region must be placed as the very first visible element in the design window.The editable region may be named anything you desire, but must contain the <%preserve_order%> In-tag.This tag allows for link/category sorting and will be deleted from all tpls that do not contain links.lCreating lbi itemslOpen a new Dreamweaver window.llCreate any object you need as a reusable element (e.g.in your theme.llSelect the object you want to add as a lbillSelect Modify->Library->Add Object to Library.Select a name for the lbi in the Assets pallet (use the same naming conventions as for dwts).llCreate lbis for all elements that are needed for the theme.lCreating tplslFrom the Site menu, select File->New from Template…llSelect the desired template if more than one exists for the theme.llInsert all desired html, lbis, and In-tags into the editable region.If the tpl will not have sorting ability, remove the <%preserve_order%> In-tag.llSave the file as an In-link Template File (*.tpl).llCreate tpls for all required pages.lAdditional FilesA few special tpls are required for the insert In-tags.The following tpls are required:list_links.tpltop_links.tplpop_links.tplnew_links.tplpick_links.tplsearch_links.tplmod_links.tpllink_count.tplFinal NotesOnce tpls have been created, do not edit the tpls in any other method than through Dreamweaver (including the admin utility).Aside from this, your new Dreamweaver tpls may be used in the same methods as standard In-link tpls.Further information on Macromedia Dreamweaver 4 may be obtained from http://www.dreamweaver.com.lWorking with In-link PHPlAny templates may contain regular PHP code and even entire programs that will be parsed and executed by In-link.This also gives the ability to enhance the functionality of In-link directly from the template files.For more information on PHP, please refer to the official PHP documentation ()By using PHP in your templates, similar to modules, you can access any system variables and routine which can be potentially dangerous [ Pobierz całość w formacie PDF ]
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • centka.pev.pl
  •