Starting a new theme from scratch, and i have looked at all the variables from Drupal.org which is kinda explained but not in detail.
Like if i do print $content it will output my entire article with
Title by author
Article content
Comment link
I kinda need to control every aspect of this, is it anyway i can output just the title , or just the article content ? I need to do it that cause i have a very unique design i am gonna put it into. So i cant have Drupal outputting entire contents without me controlling every aspect of it hehe.
And how do you output the user menu ? So i can edit profile and visit Administration Area.
I see default themes have it, but tried several variables and cant seem to output it. Which variable does it come from ?
Comments
Sounds like you need to do some reading
This should get you started: http://drupal.org/theme-guide
Try reading through and then post back any questions that pop up.
HTH
Arie
I have read it but it only
I have read it but it only covers some basics behind a theme.
Just want to know every variable so i can output what i want to show.
Just to give you an idea.
Just an fast and rough example here. Just need to know what the variables are called for all of this, not only this but for showing loginbar as well :)
Couldnt find any info on this at drupal.org.
Dump the variables array
Use a preprocess function to dump the variables array:
Alternatively you can use the Devel module to inspect the variables that are available.
HTH
Arie
Any specific requirements
Any specific requirements for this to work ? Tried inputting:
in my page.tpl.php file but nothing was shown.
Wrong file
Stick it in the template.php and it should work.
- Arie
Hmm nothing, it should come
Hmm nothing, it should come up at the front of the page ? Nothing is shown here. Weird.
Could you post your .info file?
Here?
- Arie
[code]; $Id$name =
; $Id$
name = Test
description = Test theme.
version = 1.0
core = 6.x
engine = phptemplate
Weird....
Seems to work at my end:
/themes/test/test.info :
- Exactly what you posted -
/themes/test/page.tpl.php :
/themes/test/template.php :
And you just get a blank screen?
Yeah all i got is the word
Yeah all i got is the word Test from the page.tpl.php file. Everything else is blank .
My themefolder only has .info , page.tpl.php ,style.css and template.php.
.info should be test.info
Or was that just a typo?
yeah its called test.info :)
yeah its called test.info :)
And the directory is called test as well?
That's really the last thing I can come up with.
Next thing you could try though is to install the Devel module and see what kind of info it gives you.
Also done that, installed
Also done that, installed the devel module and enabled logging but i cant see anything special when viewing my theme. Should variables come up automaticly ?
Anyways appreciate your help.
Sit back and watch the screencast
See here http://drupal.org/node/209561
That should get you started with Devel. Hope you find the problem. I'm starting to get very curious as to why you can't see the output of the print_r statement.
- Arie
Got Devel to work now,
Got Devel to work now, awesome :) But Devel fins function names. Like i found in my news the function is called phptemplate_node_submitted.
How do i output it in my theme ? I tried $phptemplate_node_submitted and $test_node_submitted but didnt work.
Sorry for dumb questions but this CMS confuses me :)