Categories:

Search by tags:

Latest news:

Most popular:

Houses, Flats, Apts 4 Rent, 4 Sale - Free Real Estate Ads.

How to create a template modx

Where you see the site without design? ;-) I note that to create high quality design in MODx you need to know html and css. Although the simple design you can create without it.

Beginning

First you need to create a template and a simple HTML-page in which to select the template. Think about where you will be items such as: the navigation menu (or a menu), the very content of the page.

HTML-code

Editing template.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title> page title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

...

between <head> & </head> insert <base href="[daring me(site_url)]" />

...
<style>
body{color: blue;}
a{color:black;}
....
<style>
</head>
<body>

The Document Object values are probably the first things you think of when you think of what values might be abstracted into a variable.

They correspond to the fields visible when you edit a document in the control panel. A common use of the [daring me*id*] and [daring me*parent*] placeholders is to create links. This can be achieved via [daring me~166~].  NOTE: Variables that can be edited using the Quickedit module/plugin may have a "#" after the "*" like so: [daring me*#content*].

  • [daring me*pagetitle*] = page title
  • [daring me*longtitle*] = often h1 or h2
  • [daring me*description*] = this can be a handy one to use in a meta description, RSS feeds, or with the Ditto Snippet.
  • [daring me*introtext*] = a.k.a. Summary; also may be useful to creating RSS feeds or Ditto Snippets.
  • [daring me*#content*] = the content of the document.
  • [daring me*id*] = the unique numerical identifier of the document.
  • [daring me*parent*] = the unique numerical identifier of the document's parent.

Now that the special tags inserted into the MODx their place, you should put the navigation menu. To do this, use a snippet of Wayfinder.

MODx menu Creation (Wayfinder):

...

[daring me[Wayfinder?startId=`0` &outerTpl=`mh.OuterTpl` &innerTpl=`mh.InnerTpl` &rowTpl=`mh.RowTpl` &innerRowTpl=`mh.InnerRowTpl` &firstClass=`first` &hereClass=``]]

[daring me*#content*]

</body>

</html>

The End)