Le Blog

Le blog laboratoire de F.L.D. Studio
0

Technical Details

If you are a web developer, you may want to know where the files responsible for this output live. Below is a summary of files and directories used by this profile:

/site/templates/
Blog profile site templates

/site/templates/blog.inc
Shared blog-specific functions included by most site templates.  

/site/templates/main.inc
The main HTML markup file through which everything is output.

/site/templates/markup/
Contains PHP files that generate markup for specific things like posts, comments, etc. This is separated from the site templates to make it simpler for you to modify the markup if you want to. This is primarily used by the blog.inc functions, but also included by a couple templates as well.

/site/templates/skeleton/
This is the Skeleton CSS framework. It is identical to the one they distribute except we added a wider viewport to it. You probably wouldn't have much need to edit anything in here.

/site/templates/styles/
Stylesheets used by the blog profile. The most useful one in here would probably be theme.css, which contains all the color definitions for the profile.  

/site/templates/scripts/
Javascript files used by the blog profile. Not much is happening in here at present.  

How the template files work

In ProcessWire there are any number of ways you can use your template files. In this case, we are using our template files (in /site/templates/) to populate 3 variables ($content, $headline and $subnav) and then including an HTML file (main.inc) to output them in the right places.

The $content variable represents the center (body) column, the $headline variable represents the text headline of the page, and the $subnav variable represents the navigation that appears in the left sidebar.

Once one or more of these variables is populated, the template file includes the /site/templates/main.inc file. That main.inc file is just a big HTML file that outputs the $content, $headline and $subnav variables in the right places.

We've made an attempt here to separate most of the logic used in the template files from the output. Most of the markup is generated from files in /site/templates/markup/. These files are included from the template files to output specific things like a blog post, comment, etc.  

Because a lot of output needs are similar among the various template files, we've created a file called /site/templates/blog.inc that has a few shared functions in it. If you look in any of the template files, you'll see that most of them include blog.inc as the first thing. This blog.inc file also initializes our $content, $headline and $subnav variables, mentioned earlier. 

For a different approach to site templates, take a look at the default site profile included with ProcessWire.  

Tags: Templates, CSS, Customization

Commentaires: Pas de commentaires

0

Test post

Paragraph copy. Consequat natu eum facilisi nisl tamen abbas. Cogo nulla defui secundum pala pneum, imputo. Bold vero humo, tego nulla pagus , ingenium, vulpes macto bene quidne, turpis. Dignissim et premo abdo eros, ille abdo ut, verto ut feugait dolore patria similis. Italic dolore luctus ad letatio nullus quia ideo exerci. Populus autem in lenis delenit facilisi, elit transverbero. Premo ad iriure transverbero delenit valetudo nobis enim eros quidem eligo ut.  Link

Headline 3

Headline 4

Headline 5
  • Bulleted list item 1
  • Bulleted list item 2
  • Bulleted list item 3

Suscipit gilvus epulae ut, nostrud eros, exerci ratis olim ea duis. Ad pala, augue eum utrum augue duis utrum patria refoveo. Augue distineo tristique eros utinam hos plaga in scisco distineo dolus venio, eros bene.

  1. Numbered list item 1
  2. Numbered list item 2
  3. Numbered list item 3

Reprobo veniam eu probo, enim pecus natu. Tation facilisi duis, sudo, ut te multo virtus neque capio. Quibus pneum vulputate abbas facilisi suscipit capto.

Blockquote. Feugait iustum enim cui cui vulpes dolus multo. Quidne iusto ingenium abico damnum eu. Dolor jumentum te macto, sudo velit typicus quis, ille suscipere odio occuro. Vindico reprobo, zelus qui ratis nullus gravis quae paulatim qui dignissim. Letatio blandit iriure huic ne populus in ad plaga ne tincidunt ille. Et vereor tation suscipit opes, premo vel zelus mara metuo singularis os euismod, et.

Suscipit ut ibidem wisi vulpes venio mara et eros.

Voco blandit magna inhibeo rusticus illum valetudo mara, tristique ut neque. Ibidem luctus autem caecus nostrud olim amet lobortis nisl demoveo tation. Quis exerci dolus autem suscipere esca ibidem in dolore, interdico, bene singularis hos, quidne. Laoreet letalis patria duis nibh, dignissim.

Acsi minim vel ut ad occuro at te gilvus wisi praesent vel humo facilisi mara.

Delenit illum jugis, ulciscor ibidem vindico utinam nulla pecus, validus camur accumsan tum exputo natu. Ventosus adsum iriure ymo nobis sit meus defui, obruo laoreet commoveo defui eu quae mara. Praesent singularis dolor enim in vereor commodo delenit dolor, dolus, conventio, acsi vero voco. Ut acsi aliquip facilisi euismod dolor ut. Validus nobis blandit hendrerit in nimis vel abbas vero facilisis, fere turpis sudo.

Ut, damnum, blandit verto feugiat aliquip ideo. Accumsan adipiscing veniam nostrud praesent eum. Eros neque illum sino, aliquip aliquip tum, opes nibh. Venio augue saepius feugait tamen volutpat reprobo abico regula feugiat premo scisco os volutpat. Capio duis consequat capto validus capio exerci caecus lucidus. Facilisis regula facilisi et praesent, obruo diam. Suscipere pertineo ratis luptatum abigo ea et consequat. Sit tation vel luctus quidem foras diam dignissim ut velit, capto nonummy sed metuo tum.

Ut nimis feugait interdico, ut tamen. Haero lucidus validus duis damnum modo in in exerci vel, sino ex adsum sudo suscipit. Mos hos consequat autem, eum vel lenis odio, luptatum nimis, odio vel huic singularis. Iaceo plaga amet aptent torqueo ymo nisl lucidus sed at cogo esse, transverbero. Erat quis iriure neo feugiat ullamcorper defui. Secundum verto, brevitas luctus adipiscing autem premo augue nisl ullamcorper quibus pagus. Ille loquor dolor ymo minim nutus, mara dolus tation. Ut os velit minim causa singularis ventosus.

Tags: Uninteresting

Commentaires: Pas de commentaires