Camen Design Forum

Dom Template and empty tags.

append delete Sgt.Nops

I recently tested your DomTemplate Class on a Template that used Fontawesome iconsets. Even when loading the template and immediately echo it out again, it came out as complete garbage.

I figured out that the Fontawesome icons like:
<i class="fa fa-heart"></i>
Where converted to this :
<i class="fa fa-heart" />

So they produced pretty weird results in the display Plus some other placeholder tags got converted too.

I solved this by adding the option LIBXML_NOEMPTYTAG to the saveXML method call in line 384.

I think this should be default behavior, as noone puts empty tags like <i class="fa fa-heart"></i> in a template whithout intention and many moderrn Bootstrap Templates for example use lots of those empty tags as Placeholders.

Reply RSS

Replies

append delete #1. jot

Older thread, I know. However here's another solution for all who are confused about editing core files:

@Sgt.Nops

I tried this and had the same problem. You can always download the icon images and use them like so:

time.nnf_thread-time {background: url("img/clock.png") no-repeat 0 50%; background-size: 16px 16px;margin-left:10px;}

append delete #2. hank1

@Sgt.Nops Can you provide an example?

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn