Sunday, May 17, 2009

How To Set Up Prawn Traps

A little devil that order

With all these stories of chunks and snippets, it's easy to lose a little. And most importantly, do not code very logical. Why bother, you say? Because depending on your initial choices you can make a site easy to maintain, or my stuff unspeakable. My little
ModX experience leads me to say that what interests the user, the simplicity of the WYSIWYG editor, TinyMCE typically comes standard. So everything else is not helpful.
So when creating a page template (template) it is advantageous to leave only lez editable user to our friend. But then, if I have a site with 25 different templates, I may have to update each of these templates at every change, for example in the header. So the solution is to use chunks I spoke a little lower. Just for example to create a snippet calls received "memory header and copy the contents inside .. the header. A bit of HTML that you call later in the template. And so, if you need to change something, it will be simple. But will you tell me, and the title of the page? Easy enough, all that will automatically point to the internal variables:

\u0026lt;! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN" " http://www.w3.org / TR/xhtml1/DTD/xhtml1-transitional.dtd ">
\u0026lt;html>
\u0026lt;head>
\u0026lt;title> [(site_name)] content = "text / html; charset = utf-8">
\u0026lt;META NAME="Description" CONTENT="">
\u0026lt;META NAME = "keywords" CONTENT = "">
\u0026lt;meta name="verify-v1" content="" />
\u0026lt;META name = "y_key" content = "" ;>
\u0026lt;base href="[(site_url)]" />

Friday, May 1, 2009

Cool Sounding Diseases

Template Variables and links


The templates variables, or TVs, it's super useful to add bits of stuff in your pages. Through templates.

Consider an example of a template that displays text. Too loud. I also want there to be an image. I could load it in the WYSIWYG editor, but for reasons of convenience I want my users without difficulties, for example if I want it to load a large image to put on the ticket and a small image to set homepage. It's called a vignette)

I just create a new TV and apply the model of my choice. For example, here I choose the template image. Then nothing easier than applying a div in the template any beast with a call to my variable as [* name-of-the-variable *]. With good links I failed, it always makes me the base URL of the site. I'll have to work.