Blog entries filtered by tag: how to emphasize the filter?

Hi there,

The headline is a bit odd, but I’m trying my best to describe what my issue is:

I tend to tag my blog entries. My visitors are able to filter my entries by tags. If they’re into music, they might visit an URL like this:

While they see all the filtered entries, nothing within the theme or the html title indicates that they’re seeing a special subpage and not the actual homepage. If they don’t take a look at the address bar of their browser, they might not even notice the filter.

Now, what I want to do is add a headline to the theme and modify the html title (you know, <html><head><title>Tag: music - My blog</title></head>). How would I do that?

Many thanks in advance!

You can achieve that with an if statement like this:

<?php if(param('tag')): ?>
  <h1><?php $tag = param('tag'); echo 'Tag:' . $tag . '-' . $page->title() ?><h1>
<?php else: ?>
  <h1><?php echo $page->title() ?></h1>
<?php endif ?>

And the same for the html title.

I think I’m finally getting a sense of PHP… Again, thank you very much, you’ve been a great help to me!