how to print custom values in custom template in drupal -


Hi I have created a content type call "mycontent"

There are 2 fields in it

Labels: MyText, Name: MyText, Type: Text Label: MIME, Name: MyEmage, Type: Image

So far, I have created a custom theme and inside it I have included it

'node-mycontent.tpl.php'

My quesiton is, how do I get to the variable?

I want to $ mytext

I can replace the global variable i.e. $ content

You can mention that you are using cck, imagefield, filefield (or whatever you are)

cck automatically adds template variations to custom fields that they $ field_ , e.g. $ field_mytext and $ field_myimage . var_dump ($ variable) or var_dump ($ field_myimage) etc. You can type in node-mycontent.tpl.php to see that How are these variables structured?

Also may be of help.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -