<HTML><BODY><br><br><br>24 августа 2011, 17:17 от "Ms. Nancy Wichmann" &lt;nan_wich@bellsouth.net&gt;:<br><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;" class="mailru-blockquote"><div id="class_1314191858">
                        <div id="13141918540000000853_TEXT">
                                <div class="js-helper">
        <style type="text/css"></style>
        <div id="viewmessagebody" class="mr_read__body">
                <base target="_self" href="http://e.mail.ru/cgi-bin/">
                
                        <div id="style_13141918540000000853_BODY"><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>I found <a href="http://drupal.org/node/1176080" target="_blank">http://drupal.org/node/1176080</a> which explains how to alter the title of a View, but it doesn't seem to work (especially in Views 7.x-3.x-dev). I have my title specified as "Studies: %1" which works fine except when there is no argument. If the argument is not present, I display all values and want the title to say "Studies: All". Can anyone help me fix this, please?</span></div><div><br><span></span></div><div><span>In hook_views_pre_render(), I have tried both of these options:</span></div><div><span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; $view-&gt;build_info['substitutions'] = array('%1' =&gt; t('All'));</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;
 $view-&gt;build_info['title'] = str_replace('%1', t('All'), $view-&gt;build_info['title']);</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;">Neither worked; I still get "%1" displayed.</span></div><div>&nbsp;</div><div><font face="bookman old style, new york, times, serif" color="#ff007f" size="4"><i><strong>Nancy</strong></i></font></div>&nbsp;<div><font face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</font></div></div>
</div>
                        <div>-- <br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</div>
                
                <base target="_self" href="http://e.mail.ru/cgi-bin/">
        </div>
</div>

                                <script type="text/javascript">document.write('</scr' + 'ipt>')</script></div>
                        <div id="ReadMsgAttachment13141918540000000853">


</div>
                </div></blockquote><br><br>I would make sure you can change the title at all, e.g.&nbsp;$view-&gt;build_info['title'] = 'Custom title';<span>&nbsp;</span></BODY></HTML>