- Posts: 13
COMMUNITY FORUM
[SOLVED] Change "displaying items by tag" page title
- Andrew Lambert
-
Topic Author
- Offline
- New Member
www.lafollette.wisc.edu/news/tag/Neuro
Is there a way to keep the site name from displaying in the page title here? Thanks.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
In the tag.php file you could use the str_replace() function to strip out the site's title.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Andrew Lambert
-
Topic Author
- Offline
- New Member
- Posts: 13
<!-- Start K2 Tag Layout -->
<div id="k2Container" class="tagView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>">
<h1><?php echo $this->escape($this->params->get('page_title')); ?></h1>
<?php if($this->params->get('show_page_title')): ?>
<!-- Page title -->
<div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>">
<?php echo $this->escape($this->params->get('page_title')); ?>
</div>
<?php endif; ?>
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
php.net/manual/en/function.str-replace.php
You need to replace the "- La Follette School of Public Affairs" part from $this->params->get('page_title') with ''.
so you need something like this.
$oldtitle = $this->params->get('page_title');
$newtitle = str_replace("- La Follette School of Public Affairs", " ", "$oldtitle");
echo $newtitle;
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Andrew Lambert
-
Topic Author
- Offline
- New Member
- Posts: 13
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.