Set Closesingletags In Config

Can someone enlighten me as to what to add to my config file so that the closeSingleTags property of CHTML is set to false?

Extending the question is there a clear guide to what can be set in the config file?

I often see things that seem to me should be able to be set in config but I’m at a loss as to what section to put it in &/or what key to use. Knowing some pattern rules to follow could be a grand help.

Cheers, Pedro :)

this is a static property, so you could add in your config file (in the beginning, before "return array(" line):

CHtml::$closeSingleTags = false;

there is one general rule: every public property of a component (which means regular property like "public $property;" or virtual one provided with getter and setter functions) can be set in config file for any application component and application module that appears in config.

This is why there is no single manual saying what you can set, because it depends on what components you are using, and there is very big repo of third party components. To determine available properties look at component documentation or simply in component code if documentetion is not sufficient or not present for a component…

Yay! My HTML5 now looks as methinx HTML5 should :)

That gives me food for thought. Thanks :)

Re-visiting this… can I extend that answer to the way to set static properties on other Yii classes? Like…


Class::$property = value

As I write I think that sounds daft so here’s where I’m coming from… I’m primarly an iOS developer but my dream project needs a website with a front end, a back end, a middle end, & an API, to support the app. Being a team of one & the best developer I can afford I’m trying to build that, including learning how to build it, in a hell of a hurry. So I’m learning a lot of stuff in a hurry & I’m sure there’s gaps. I think my question is in one of those gaps.

Yes, that should work like you wrote but only for static properties.