I get what you mean, but you haven't explained how it achieves it. I can create specific templates via a regular theme too; how does Carrington do that any easier/better than a regular theme?
I get what you mean, but you haven't explained how it achieves it. I can create specific templates via a regular theme too; how does Carrington do that any easier/better than a regular theme?
Okay, I see where you're going with that, however, I see that as a BAD thing. The markup should not change based on trivial stuff such as that. Markup that must change in that manner strikes me as badly designed.
Yes, yes, there's room for differing markup based on different types of pages, but changing markup based on things like comment author and such strikes me as a poor thing to do from a semantic perspective.
Ideally, the best way to do that is with different PHP files and naming conventions. In the same way that you can do category-X.php, for example. If there's a need for more of those, then they should be integrated into the core, not into the theme.
I'm pretty darned good at this sort of thing. So if I don't get it, then yes, it is lousy! ;)
Mainly, I don't get why you'd want to change the markup based on trivial indicators. Sure, yes, you can do it with if's, and sure, yes, I'm sure you can devise some kind of solution to make that simpler. What I don't get is WHY you'd ever want to do that sort of thing. It strikes me as bad design. If you need to change your markup based on that sort of thing, then I think that you're doing it wrong.
Why? Why does it bother you to have stuff in the markup that is not displayed? More to the point, why do you think that what displays has anything to do with the markup?
The HTML markup is supposed to describe the content. Period. That's it. It's not supposed to have one single solitary thing to do with the look of the page, at all.
Remember, the user looking at the site with a browser is not looking at the markup. He's looking at the markup + a stylesheet that describes how to display that markup. However, some other system might not use the stylesheet (Google, some weird browser, anybody using microformats for virtually anything, etc.)... the markup is there to describe the content. If you rework the HTML to leave out bits, then those systems have to be reworked to understand your weird changes.
In other words, the way you're doing it now (by not displaying stuff via CSS) is the correct way to do it. The way you're describing Carrington leaving stuff out is the wrong way. It's very bad for microformats and any other semantic based systems. It will probably even result in bad SEO in the long run.
Make your markup fit the content. Don't make your markup fit what you want on the screen.
Let me give you another example. Take a look at my site: http://ottodestruct.com . Okay, I haven't done a lot with it lately, I mainly use it for playing around and testing stuff.
-Now, load it up in a mobile browser (not an iPhone). Notice how the sidebars are gone?
-Try a Print Preview on it. Looks a lot different, yeah? Much nicer for printouts, I think, since it eliminates all the crap.
-Take a microformat parser and run it on the page. Lots of useful information shows up, eh?
That's all using ONE set of markup. Just one. Three different stylesheets define how it works in different types of renderers. The microformat stuff is almost all display:none, all the time, because it's there not to be seen, but to be read by microformat parsers. No PHP to run when you want to get a different version for printing. No PHP to run to show it differently to a phone.
You're talking about changing the HTML on-the-fly, but I'm saying that if you do that, you lose all the real benefits of truly semantic HTML.
Last edited by Otto; 06-09-2009 at 01:39 PM.
I took a look at Carrington in Eclipse and it was just a mess. Strange methodnames, strange organization etc. Thematic was a wonder of simplicity in comparison.
And the main HTML Markup should not change. UL, DIVs H1, etc can be added to the main HTML markup but the main markup should not change. HTML is to organize content not design it. You should not design if you have never come in contact with http://csszengarden.com/. That is how you are suppose to do themes. Also most theme HTML markup is crap.
What I want to see is this HTML markup. You can do A LOT with that and CSS.
bodypage
- header
- h1 logo
- content
- main
- sub
- nav
- navsec
- footer
endbody
Check out the old http://www.wymstyle.org/ . Most CSS frameworks are crap in comparison to its simplicity. I still use wymstyle even though its 3 years old. Have had to fix some things due to browser version but its great.
I'm sorry but I feel like we're arguing at cross-purposes.
You will never hear me argue against semantic markup, or against the principle that you should not use changes in markup to accommodate styling changes that SHOULD have been achieved in CSS. Remember, I'm the guy who wrote the ClassyBody plugin way back when, which attempted to bring Sandbox "goodness" to any theme. SO no arguments there.
When I talk about modifying the markup I'm talking not of trivial stylistic issues but the addition or subtraction of content, of data. I would have hoped that was clear.
The CSS is always what you style it with, but there's nothing to style if the data/content isn't there!
The "boast" of Carrington is that instead of giving you just a bunch of templates which correspond to entire pages (i.e. 404, search, index, single, page, etc), Carrington breaks those down into their component parts, like header, footer, loop, content/excerpt, etc and lets you create templates for just these.
For argument's sake it's WP templates on steroids.
Now none of you would ever argue against the idea of custom templates in WordPress, so I can't see how you can argue against what Carrington has done to, IMHO, enhance this.
In most cases, with Carrington I don't need to go into my WordPress Edit Page screen and select a custom template, because Carrington will be able to work it out automatically. Secondly, WordPress custom templates apply to the whole page, whereas Carrington can assign a custom template to just the loop and just under a specific circumstance, say, when we're in the "boloney" category.
Now... feel free to argue here, but as I see it, you'd be arguing against the very idea of custom templates, and unless you don't get what Carrington does, there is no argument that Carrington is clearly a dramatic enhancement of how WordPress does custom templates.
Let me suggest that the reason you MAY not be getting this is that (perhaps) unlike Alex King and me, you have not spent countless hours building business/corporate/magazine or similar sites, where there are all kinds of bits of content need to be added or subtracted in one place or another. That's not a put-down or anything... I'm just wondering if you're not grasping the acuteness of the need that people like me feel for this sort of thing.
To use a parallel example, I'm one calling for a rewrite of how widgets work, since they lack a lot of intelligence. You have to do some pretty dramatic customization to widgets if you want to add "smart conditionality" to their display. I've seen how a number of different themes attempt to do it, and most are problematic.
Remember, I'm not talking about hacking a point-solution into a theme... I'm thinking of an elegant approach that works for people who are not programmers :)
Anyway, hope that's some further clarity.
I suspect Croud Favorite came up with Carrington as an answer to what THEY needed to make their own internal dev work easier. The fact that it really appeals to me might have something to do with the kinds of projects we work on. If all you're building is "standard" blogs then I suspect Carrington (or Vanilla) will look like an unnecessarily complicated solution.
-Alister
I understand what Carrington does. The thing here is the ability to create custom templates for smaller elements (i.e. a single author's post content) rather than larger elements (i.e. a single author's entire page).
For most projects, I would consider this overkill because most sites are structurally the same throughout the entire site with little variation.
To me, this is a huge step forward in theming for larger projects. It makes them easier to organize. Plus, it allows several sites to run off a single framework, which cuts back on loads of programming time.
I think the part where so many people are confused is the lack of any real documentation. It's vastly different than most themes and requires more explanation. Originally, it included several readme.txt files that explained all this stuff. I'm not sure what happened to those.
@Otto - I think you have totally missed the point of Alistairs video. I still don't see any real use in the theme, but I also disagree with most of what you posted.
Markup is changed for all sorts of reasons. There is no way for you to know if someone has a good reason for changing a particular piece of markup or not.
Why? The semantics don't need to change just because the markup changes anyway. Not that there is any reason why the semantics shouldn't change depending on the page you are on. It all depends on what that page is supposed to convey. Plus there may be different content on certain pages, hence the markup/semantics MUST change.
That isn't quite as elegant as what Alistair is suggesting. By using separate template files, you need to repeat all of the same markup over and over again for each template. I think Alistair is saying that with Carrington you don't need to do that.
Why not? There are an infinite number of reasons for changing markup. Every page does not need to be identical to the next one.
Why would you want to add stuff to the markup if it is never displayed? That would be utterly pointless. EDIT: By 'displayed' I was referring to anything, ie: screen readers, printers, search engines etc. not just computer screens.
No it is not. How can changing markup be a bad thing? That is the way WordPress works, it outputs different markup based on various choices by the end user. Alistair is simply talking about extending that a little further to allow more fine grained tuning.
Your argument about semantics is flawed because Alistairs suggestions gives you more control over the semantics of a page, not less.
Last edited by Ryan; 06-10-2009 at 06:28 AM.
So was I. But what I don't understand is why you'd want to remove or add content based on "trivial" indicators.
Take the comment-author for example. If the comment is by the same person as who wrote the post ("bypostauthor" in the CSS), then what content are you adding or subtracting? Why? I can think of almost no valid reason to change the structure of the content inside the comments block itself.
I am aware of how and what Carrington does. I also don't see how any of it is helpful or necessary. It is all unnecessary complication, in my view.
Why exactly would you want that category to have different markup in the Loop, for example?
See, you go on about this sort of thing, but for the life of me I cannot understand or see any realistic circumstances where a) you'd really want to change the semantic structure of a small portion of the page based on something like that and b) how making a special loop case is any easier than copying the page into a new Page Template and using that. Sure you don't have to specify the page template, but that gives you LESS control, not more, because now you're relying on naming conventions or special code in the template itself.
I would argue that "enhancement" is a matter of opinion, not of fact.
True, but it's nicer when the site all obeys more or less the same structure. Then changing things is far easier to accomplish.
On different pages, fine. But what about midway through a section of the page? That's the kind of fine level control that this sort of thing adds, and which is IMO not necessary nor desirable.
Also, markup == semantic structure. If you change the markup, the semantics are no longer the same by definition.
By "displayed", I was referring to "shows on a screen, in a browser, on your computer". Difference in wording.
More control is not always a good thing. You want consistency. Changing markup midway changes the semantic structure of the page midway as well.
Ok. here's a thing I couldn't do with a theme:
Have 10 posts on the homepage (that I've set up in the reading settings in the back end of wordpress) and on the categories and tags pages display all the posts that are in that category!
wp_query is just to Sci-fi for my level of expertise.
Cristi from www.cozmoslabs.com
@Otto - I don't disagree with your last posts at all, but I can still see reasoning behind making it easier to modify markup on a per page basis. Of course there is rarely a use for that and I certainly don't understand how Carrington actually makes it easier, but the concept is sound IMO.
Last edited by Ryan; 06-11-2009 at 02:04 AM.