Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » MetaTags booleans

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

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

Page: 1
Go to End
Author Topic: 1296 Views
  • Nathan Cox
    Community Member
    99 Posts

    MetaTags booleans Link to this post

    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.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.