Views, Panels, Arguments and Title

mactoph - June 12, 2007 - 04:19

I have setup some views that display content from different terms depending on the argument.

I then setup a panel that uses an argument to pull in views that match that argument.

My question is regarding the title on the panel that I have setup. It works fine set as Title, but I would like it to say argument Title.

Make sense? Any ideas on how to do this?

I think I can simplify this...

mactoph - June 16, 2007 - 02:46

I think I unnecessarily complicated a simple question above- what I should have asked is, "Is it possible to insert an argument into a panel page title?"

This works

mactoph - June 16, 2007 - 20:04

There may well be a better way of doing this, but this worked for me:

I opened up page.tlp.php and replaced

<title><?php print $head_title; ?></title>

with

  <title>
  <?php
if (arg(0) == 'name of first argument') {
     print 
ucwords(arg(1)) ." Resources";
     }
else{
     print
$head_title; ;
     }   
    
?>

</title>

another way?

mactoph - July 16, 2007 - 23:49

I haven't tried it, but this module may be another solution:
http://drupal.org/project/panels_titles

 
 

Drupal is a registered trademark of Dries Buytaert.