• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

wo wird diese Variable gesetzt?

mrmaus

Mitglied
hallo,

ich nutze drupal und habe in einer .php datei folgenden auschnitt gefunden:

<title>Free Download - <?php print $head_title ?></title>

der seitentitel wird dort gesetzt, aber wo die variable? im gleichem script die variable nicht anzutreffen!

das ganze sript:

PHP:
<?php
// $Id: page.tpl.php,v 1.25 2008/01/24 09:42:53 goba Exp $
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language ?>" xml:lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
<head>
  <title>Free Download - <?php print $head_title ?></title>
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <?php print $head ?>
  <?php print $styles ?>
  <?php print $scripts ?>
  
</head>
  
<body>
 <div id="main">
     <table class="bg-right" width="100%">
            <tr>
                <td width="100%" class="header">
                    <table width="100%">
                      <tr>
                        <td width="100%" style="height:69px;">
                            <table width="100%">
                                <tr>
                                    <td style="width:535px;">
          <?php if (isset($primary_links)) : ?>
                                            <div class="pr-menu">
                                                <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?>
                                                <br class="clear" />
                                            </div>
                                        <?php endif; ?>
                                    </td>
                                    <td >
                                        <?php if ($breadcrumb != ""): ?>
                                            <?php print $breadcrumb ?>
                                        <?php endif; ?>
                                    </td>
                                </tr>
                            </table>
                        </td>
                      </tr>
                      <tr>
                        <td width="100%" style="height:306px;">
                            <?php if ($logo) : ?>
                                <a href="<?php print $front_page ?>" title="<?php print t('Home') ?>"><img src="<?php print($logo) ?>" alt="<?php print t('Home') ?>" border="0" class="logo" /></a>
                            <?php endif; ?>
                            
                            <?php if ($site_name) : ?>
                                <h1 class='site-name'><a href="<?php print $front_page ?>" title="<?php print t('Home') ?>"><?php print $site_name ?></a></h1>
                            <?php endif; ?>
                            
                            <?php if ($site_slogan) : ?>
                                <div class="slogan"><?php print($site_slogan) ?></div>
                            <?php endif;?>
                        </td>
                      </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="cont-row">
                    <table width="100%" >
                        <tr>
                            <td width="200">
                                <div class="left2">
                                    <?php if ($left != ""): ?>
                                        <table width="100%">
                                          <tr>
                                            <td width="100%">
                                                <?php print $left ?>
                                            </td>
                                          </tr>
                                        </table>
                                    <?php endif; ?>
                                    <div class="search-box">
          <?php if ($search_box): print $search_box;  endif; ?>
                                    </div>
                                </div>
                            </td>
                            <td width="">
                                <div class="cent">
                                <div class="border-left">
                                    <div class="border-right">
                                        <div class="border-top">
                                            <div class="border-bot">
                                                <div class="corner-top-left">
                                                    <div class="corner-top-right">
                                                        <div class="corner-bot-left">
                                                            <div class="corner-bot-right">
                                                                <?php if ($is_front != ""): ?>
                                                                    <div id="custom"><?php print $custom ?></div>
                                                                <?php endif; ?>
                                                                <?php if ($mission != ""): ?>
                                                                    <div id="mission"><?php print $mission ?></div>
                                                                <?php endif; ?>
                                                                            
                                                                <?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif; ?>
                                                                <?php if ($title): print '
                                                                    <h2'. ($tabs ? ' class="with-tabs title"' : '') .'>'. $title .'</h2>
                                                                '; endif; ?>
                                                                <?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif; ?>
                                                                <?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
                                                                                 
                                                                <?php if ($show_messages && $messages != ""): ?>
                                                                    <?php print $messages ?>
                                                                <?php endif; ?>
                                                            
                                                                <?php if ($help != ""): ?>
                                                                    <div id="help"><?php print $help ?></div>
                                                                <?php endif; ?>
                                                            
                                                                  <!-- start main content -->
                                                                <?php print $content; ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <div id="footer">
     <div class="foot">
         <?php if ($footer_message || $footer) : ?>
                <span><?php print $footer_message;?></span>
            <?php endif; ?>
        </div>
    </div>
<?php print $closure;?>
</body>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-11913925-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</html>
 
Genau, die von mrmaus gepostete Datei ist ein Drupal-Theme-Template. Die Variablen, die dort zur Verfügung stehen, werden vom Drupal-System automatisch gesetzt (ich denke, in include/themes.inc, aber das ist mehr oder weniger unwesentlich).

Die Variable $head_title enthält unter anderem den Wert, der in admin/settings/site-information für den Namen der Seite gesetzt wurde.
 
Zurück
Oben