Topic: Breadcrumbs with new lines

Dear wolf members,

I'd like to ask about the purpose of the new lines after the breadcrumbs in the Page model, line 149 (breadcrumbs) and line 212 (_inversedBreadcrumbs). I feel that this makes the code output a little uglier and can't think of any necessity in this.

Should you just remove them from the core (I do this), or is there something else that it's not obvious?

Thumbs up

Re: Breadcrumbs with new lines

Good question, also why not use PHP_EOL instead of \n

3

Re: Breadcrumbs with new lines

Hi sokyll, and welcome to Wolf smile (traditional greeting for first post!)

I'm guessing that you've got the 0.6.0a stable version in mind? "Breadcrumbs" used to be wrapped in a DIV, which is (I'm guessing again) what is occasioning your new lines. If so, it was removed some time ago. You can check the current Page.php model (with quite different line numbers, too!) to verify.

Oddly enough, I see the "\n" call in line 211, but it never produces new lines in my "breadcrumbs" ... strange, but true! It is the same code that produces the breadcrumbs you see here on WolfCMS.org.

Edit - Right, I see how "\n" affects the source view ... can't say that I've looked very often! (Obviously! wink )

Last edited by David (2010-09-10 19:51)

Re: Breadcrumbs with new lines

The "\n" should be removed. Generic policy of the Wolf CMS project is/should be to produce as little HTML as possible from inside its functions. smile

Edit: fixed in r234

Last edited by mvdkleijn (2010-09-11 12:39)

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

Re: Breadcrumbs with new lines

This is great guys! Thanks.

Thumbs up