-2

Let me rephrase my question since we got on the wrong foot here.

Was there any effort to make HTML5 overrides for Joomla so that only absolutely necessary HTML is outputed to present all Joomla features.

There are additional DIVs which only purpose is to provide semantic attributes while same thing can be achieved by using HTML5 specified tags with much less markup.

Also, one other thing. Most of default module chrome options don't support all possible module settings like custom title tag (h3 is hard coded), bootstrap column span option etc...

I had to make my own chrome overrides to enable all this settings. It seems like a waste to not use all of the settings available in the administration.

There is a lot of bit's and pieces that stand with no purpose at all (especially in the stock modules), and I can't collect them all in this question.

So, is there some kind of Joomla HTML5 boilerplate that keeps markup absolutely minimal and clean?

It's much easier to add what you need than to go through all the messy code and removing unnecessary markup that sometimes spans through several if elsestatements.

  • 1
    Can you provide a more concrete example of what you see as "unnecessary"? This can be a very subjective issue, depending on what you want to do with the page, and the CMS will likely side with providing more spans, divs, and classes to allow you to do more with the page. – David Fritsch Aug 7 '14 at 18:51
  • There are many settings for this to lower it at least to an extent in some of the global configuration areas. Also creating your own template can help, the templating system in Joomla may be simple, but its more powerful then most I have seen. I have never seen ten wrappers on an article though, can you clarify on how you manage to get it to do that? 1-2 is the most I ever see. – Jordan Ramstad Aug 7 '14 at 22:13
  • What are the issues you have with the templating engine that won't let you create a great template tailored to your needs? – FFrewin Aug 8 '14 at 5:48
  • What's wrong with the templating system? Extension layouts are based on HTML which you can create an override for and change to your exact requirements. There's nothing wrong with the way things have currently been implemented. Are you by any chance referring to the TinyMCE editor adding in all these wrappers? – Lodder Aug 8 '14 at 11:29
  • @Lodder sorry, maybe you misunderstood me. Templating system is perfect, but I wish they used better templating language. But this was just a side note more appropriate for joomla forums. – Reygoch Aug 9 '14 at 15:38
0

Yes, there are many in the form of template overrides. You can find some of mine , the most important being com_content, in my template starter, Oneweb:

https://github.com/nternetinspired/OneWeb/tree/master/html/com_content

Please be aware that these are a little out-of-date though, as they are missing some recent additions like tags though the output is clean, semantic html :)

Obviously, creating and maintaining a complete set of overrides for all core output is huge task, and it is ultimately unsustainable. It's far better, longer-term, to try and incorporate such changes upstream IMO, though I know from personal experience that progress can be frustratingly slow at times:

https://github.com/joomla/joomla-cms/pull/2657

0
  1. I'm not entirely sure why you have created 2 profiles, but if you have any question, even if you think they may be downvoted, please simply stick to 1 profile.

  2. Judging by another question you wrote on using your other profile, I am under the impression that you want to make things as simply as possible. The only problem being, is that this can't always be done. As I mentioned on the other question, your "short hand" code may have been easier to write, but it was slower in performance, and what is the same scenario with the suggestion you posted as a comment.

The above below gets the article title and escapes it. Pretty straight forward.

echo $this->escape($this->item->title);

Creating a wrapper such as {article_title} means that you will have to use a replacement method, such as str_replace. This means another function that isn't necessary. If you have multiple articles on 1 page, it will perform this action multiple time, therefore, I don't mean to sound harsh, but it's absolutely pointless.

If you look at the difference in size, well....there isn't much, so it's not hurting anyone.

And finally, lets say you wanted to perform some custom actions with the article title. For example, Let's say you wanted to make the first word of every article title a different colour, by wrapping the first word of the string in a <span> tag with a class. You would not be able to, or it would become very hard doing this using {article_title}, as you have lost control.

So if you look at it another way, it has been kept as it is, making it more dynamic.

The majority is what Joomla provides is to make life easier that you as a developer can customize it to your liking ;)

Hope this answer your question clearly

  • I made another profile because I had some problems with previous email address. I'm changing my accounts on all forums I belong to because of it. – Reygoch Aug 10 '14 at 6:04
  • And again, this comment about templating language is just a side note, you haven't answered my original question. (and, templates which contain stuff like {something} are usually compiled). – Reygoch Aug 10 '14 at 6:06
  • Also, I didn't even consider that I might be downvoted. I guess it's just a fanboy instinct (which I'm not free of either :P), but still, I hold it was a valid point. I'm free to critique my favorite CMS. – Reygoch Aug 10 '14 at 6:09
  • You have completely changed your question. You were originally asking about reducing the amount of PHP being written, which is what my answer was based on and does actually answer that question, and how you're asking about cleaning up HTML. – Lodder Aug 10 '14 at 9:49
  • Title stayed the same, and you can see in the original post (if you check revisions) that I'm asking if someone created minimal markup for Joomla components. And everybody got stuck on my comment at the end of the question that it's hard to make a decent cleanup because of messy looking templating language completely disregarding original question. Not to mention you have gone through effort to find unrelated question on my other account and answered it here. – Reygoch Aug 10 '14 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.