Accessing text of a field with type "Text" I fear that my question could be covered in detail already somewhere, but I did not find something useful. So appologies if this is the case.

I added a field of type "Text" to content type "Article". Now, I want to access the string of this field.

I want to access this in file template.php of the theme I use. To be precise, I want it to access in function "tb_corpal_preprocess_page". (File from themebrain theme "tb_corpal".)

I can see that in another function the "field_image" is accessed like this:

if(isset($vars['content']['field_image']))


If I now want to extract my field_banner, which is a field of type "Text", how do I do that? I guess it should also be stored in $vars, right? If yes, how do I access the string?
start by downloading the devel module.

A suite of modules containing fun for module developers and themers
...
Devel
Helper functions for Drupal developers and inquisitive admins.
This module can print a summary of all database queries for each page
request at the bottom of each page. The summary includes how many
times each query was executed on a page (shouldn't run same query
multiple times), and how long each query took (short is good - use
cache for complex queries). Also a dprint_r($array) function is
provided, which pretty prints arrays. Useful during development.
Similarly, a ddebug_backtrace() is offerred. much more.

This includes a function dpm() which allows you to navigate through complex variables including $vars. dpm($vars) will create a user interface for navigating through it - then you can find the specific location for the field you want.
I included this as an answer instead of the presumed actual location of the field within $vars since this allows you future access to any variables you need. You can use this for example to go through a $form, $content, etc.