I'm setting up a small site for my research, and have 4.4 RC installed with the Chameleon theme. I'm coming from MT, whose templating system is pretty accesible for the noncoder. But I really like the ease of use and flexibility of Drupal. My problem is that editing the themes is proving too formidable for me. In trying to rearrrange the way variables are displayed (poster, date, taxonomy, etc) I end up looking at line that look like this:
$submitted = array(t("By %author at %date", array('%author' => format_name($node), '%date' => format_date($node->created, 'small'))));
and feeling very very small.
So I'd like to hear if there's anyone here that might have the time to comsult with me on graphical changes. I'm a poor researcher, but I'd be willing to paypal someone for a little help.
email me if this is interesting.
tmq@fma.no
Comments
xTemplate
Have you looked at Drupal's xTemplate templates?
Customisation is easy (IMHO), and you have control over the structure (XHTML/HTML) and style (CSS).
------------------------------------------
Drupal Specialists: Consulting, Development & Training
Robert Castelo, CTO
Code Positive
London, United Kingdom
----
Yes this is much easier. I've
Yes this is much easier. I've had no problem with most of the graphic customizations, but there are a few things that I haven't been able to figure out:
When bringing up a page by taxonomy
(/drupal/?q=taxonomy)
where is the page that fills the main div templated? The default gives me a link for Home, then a title for taxonomy term. I'd like to remove both of these, but can't locate them in the xtemplate.theme or xtemplate.xtmpl...
What is the function of the logo-background.jpg? I've ended up making it the same as logo-hover, which seems to render correctly, but the original jpgs are different...
Moving some things around in xtemplate.xtmpl gives me parse errors in xtemplate.inc (for example removing 'mission' or relocating 'taxonomy'), although I fixed the first one by also removing the call in the xtemplate.theme...
xTemplate
I've been adding xTemplate documentation for the last couple of days, still a long way to go, but some of it might be useful to you already:
[xTemplate Theme system]
"When bringing up a page by taxonomy"
There is no separate template for this, xTemplate just displays multiple nodes (just their summary). Could you explain more what you are aim is.
logo-background.jpg is the background pattern of the table cell that the logo is in. If the table increases in height because of text, then the background will repeat, filling the space behind the logo. You can also use it as a background to make logo-active.jpg and logo-hover.jpg, if you want to add your own logo
"Moving some things around in xtemplate.xtmpl"
Read [Template Basics] for some guidelines on this.
------------------------------------------
Drupal Specialists: Consulting, Development & Training
Robert Castelo, CTO
Code Positive
London, United Kingdom
----
"When bringing up a page by t
"When bringing up a page by taxonomy"
This applies really to any page except the first one, but in different ways. Clicking on a taxonomy term brings up all posts with this tax. At the top of this page, the taxonomy term is displayed as a title. I would like to tweak or remove that title. Similarly, all pages except the first one have the title Home at the top of the main div. Seeing as the logo cell will always allow the user to find home, I would like to remove this as well. But I'm not sure where these two elements are being created.
"Moving some things around in xtemplate.xtmpl"
Thanks for the documentation, but I'm still in the dark about this. Given the following structure:
!-- BEGIN: node --
div class="node {static}"
!-- BEGIN: avatar --
div class="avatar"{avatar}/div
!-- END: avatar --
!-- BEGIN: title --
h1 class="title"a href="{link}"{title}/a/h1
!-- END: title --
!-- BEGIN: taxonomy --
span class="taxonomy"{taxonomy}/span
!-- END: taxonomy --
span class="submitted"{submitted}/span
div class="content"{content}/div
!-- BEGIN: links --
div class="links"» {links}/div
!-- END: links --
/div
!-- END: node --
I don't understand why I get errors if moving the
"!-- BEGIN: taxonomy --
span class="taxonomy"{taxonomy}/span
!-- END: taxonomy --"
above the
"!-- BEGIN: title --
h1 class="title"a href="{link}"{title}/a/h1
!-- END: title --"
but I do: parse error in xtemplate.inc.
I removed 'mission' completely, but in order to get rid of the parse errors, I also had to remove references to it in the xtemplate.theme. I don't really see how the layout of xtemplate.xtmpl effects the parsing.
Thanks for your help.
PS-- I had to remove the '<' and '>' to get this post to show correctly. I tried using 'quote' and 'code' tags that allow the pasting of code into posts in other systems, but they have no effect here. What is the best way of showing code in posts here at Drupal?
More specifically, if you loo
More specifically, if you look in the themes folder, you'll see the xtemplate directory.
Inside there are "default" and "pushbutton" folders. "Default" is probably a good one to test with, so duplicate the folder and call it something else, like "test" (which you can select in the admin interface: admin --> configuration --> themes --> xtemplate).
Inside that folder are two files that are the most important: xtemplate.xtmpl and xtemplate.css. As you can see, the xtemplate.xtmpl file is almost standard HTML with a few curly braces to indicate where dynamic content goes. Edit it and the accompanying CSS file as you normally would any other HTML file, and you're done.
Thanks for the tip-- I'll che
Thanks for the tip-- I'll check it out. The http://www.cortextcommunications.com/cvs/ site looks sharp.
This is all good advice..
I'm just getting my feet wet with Xtemplate and have to say that this is all rock solid advice. Best start with the 'default' template as it is the most straight forward.
Note that the html comments <!--comment--> seem to be important, so try to keep them intact.
If you have a wysiwyg html editor, you can open the .xtmpl file and design/edit as if it were an html file.
Best of luck!
- Joe
Joe Lombardo | Drupal Services: Community-Publishing.net | FamilyTimes Online Journals