Keyword

How do I change the title of a page?

  • Christopher J. Vimes II
  • Christopher J. Vimes II's Avatar Topic Author
  • Offline
  • New Member
More
14 years 8 months ago #72154 by Christopher J. Vimes II
How do I change the title of a page? was created by Christopher J. Vimes II
I've modified the template for the user page, but I'm unable to change the

What I'm doing is making it so names like "Chris Vimes" appear as "Chris V." using PHP, and dynamically showing the name if you're logged in, or showing the partial name if logged out. The code I'm using is:

// splits first + last into "First L." for logged off users


if ($user->id <= 0) {
$toks = explode(" ", $this->user->name);

if (isset($toks[1])) {
$myName = $toks[0] . ' ' . substr($toks[1], 0, 1) . '.';
} else {
$myName = $this->user->name;
}
} else {
$myName = $this->user->name;
}

// end split name

However, when doing this, the title is still "Chris Vimes", for example, and I can't figure out how to change this.

Any help is greatly appreciated.

Please Log in or Create an account to join the conversation.

  • Christopher J. Vimes II
  • Christopher J. Vimes II's Avatar Topic Author
  • Offline
  • New Member
More
14 years 7 months ago #72155 by Christopher J. Vimes II
Replied by Christopher J. Vimes II on topic How do I change the title of a page?
I figured it out; for anyone else with a similar problem, it's in /components/com_k2/views/itemlist/view.html.php

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum