By Todd Matson on
I've been looking through the documentation, but I haven't seen any mention of the language used to compose Drupal pages. I know I can use HTML tags, but I feel uncomfortable doing that until I learn whether or not HTML is intended to be the markup language for Drupal pages. Is it?
If it is, does Drupal extend HTML with special codes for embedding Drupal functionality on pages? (For instance, can I put a menu in a page?) If so, where can I find documentation on those codes?
Also, what is the proper way of linking from one page to another? Do I use the HTML tag like <a href="index.php?q=target">hyperlink</a>, or does Drupal offer a more elegant option?
-TC
Comments
HTML is standard markup for
HTML is standard markup for anything on the web. Drupal is scripted in PHP, with its own special API.
Unless you do something weird, your theme files will always accept HTML and, depending on what Input Filters you enable, your users should be able to markup their writing with HTML as well.
You are certainly able to use an HTML tag like in above, but you are encouraged to use things like the Drupal API's link function. You use it inside
PHP tags, if they've been opened. So it would work like this..Which would output a link to whatever the named path is that represents node 1240. (That may be http://www.yoursite.com/posts/this_is_the_named_path or something.)
Hope that makes sense.
--
I was the lead developer for the New York State Senate.
Yes, that makes sense. But
Yes, that makes sense. But where is this stuff documented? If I hadn't asked this question, I'd never know about the l() function. The API site you linked to is very dense -- I can't understand it at all. Where would I go to find a simple reference guide to the Drupal functions I need?
By the way, I've discovered that the HTML tags
<img>and<sup>don't work on my pages. So, now I'm trying to figure out how to do the following on a page:I've learned more about
I've learned more about this. HTML is supported, but by default only some tags are allowed. All other tags are filtered out. To control the ones that are filtered, you need to go to Administer / Site Configuration / Input Format. Then, you may need to go to each page and change its Input Format. (It took me about an hour to figure that out.)
With full HTML supported, I can do a lot more with my pages. I'd still like to know what the Drupal markup functions are, though.
-TC