Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

MetaTags booleans


Go to End


1786 Views

Avatar
Nathan Cox

Community Member, 99 Posts

22 July 2007 at 6:26pm

I just noticed a bug with $MetaTags (or with the code to call it)...MetaTags expects a boolean $includeTitle to tell it whether to print the <title> tag.

The problem is, if you do $MetaTags(false) (or $MetaTags(true)) the argument gets passed as a string, rather than a boolean. Which means it always prints the title, even if you pass in false.

I've modified MetaTags to check for the string 'true' instead of boolean true, but it might be better to make the templating return a boolean.