[support] User name in title of View?

Steven Scotten steves at splicer.com
Fri Oct 2 19:27:01 UTC 2009


Wow, this is awesome but also a little confusing.

The title of the argument overrides the title of the page, cool. But  
I'm still not clear about getting at the value of the argument.

I have to choose an action to take if argument is not present, and for  
some reason the argument is never present. Does this mean I have to  
add the argument to the URL? That defeats the purpose of using the  
name of the current user.

When I looked at the form for configuring the argument User: Name, the  
first thing I tried was putting "%1" in the title. I can choose  
"Provide default argument" as the Action To Take if Argument Is Not  
Present, and then use PHP code , but that seems like I'm doing way too  
much for what you described as a simple setting.

Sorry if I'm being dense.


Steve

On Oct 2, 2009, at 11:52 AM, Shai Gluskin wrote:

> Steve,
>
> This is what Views "arguments" were created for. Make the user  an  
> argument. The argument settings allow for dynamic content, based on  
> the argument, to be used for the page title.
>
> Shai
>
> On Fri, Oct 2, 2009 at 2:48 PM, Luciano Rossi <lukio at gcoop.com.ar>  
> wrote:
> Steven Scotten escribió:
>
> This seems like a simple enough thing, but I'm plum stumped.
>
> I've created a view of all a user's content, and I'd like to include  
> the username in the title of the displayed page. I've tried using  
> token and variable syntaces and both simply display the actual  
> characters I typed, not substituting the username.
>
> Is it true that the title of a Page created by Views has to be  
> static text and cannot include data about the content displayed?
>
> Hello, you can write php code at the head of the view if you enable  
> the php filter.
>
> Cheers!
>
> -- 
> Luciano Rossi
> gcoop - Cooperativa de Software Libre
> www.gcoop.com.ar
> (0054 11) 4856-7925 Luis. M. Drago 364 3 B
>
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]



More information about the support mailing list