Opinions Required: Custom HTML Markup from PHP with or without tag prefix.
Posted
by buggedcom
on Stack Overflow
See other posts from Stack Overflow
or by buggedcom
Published on 2010-04-29T15:29:13Z
Indexed on
2010/04/29
15:47 UTC
Read the original article
Hit count: 341
I've created a class in PHP that allows you to create custom HTML markup. It basically works a bit like FB Markup or EE tags. It works off a tag prefix, so you can add tags like this.
<ctag:pagination per_page="20" total="500" page="0" base="http://localhost/page?page={page}" mode="smart" adjecents="5" />
My question is: Is the markup above better than the markup below? I'm asking as I'm considering branching my code to rework the tag matching so you can just generate custom html elements. It would well for a drop in HTML5 replacement service. Match the User Agent for a none HTML5 browser and replace the HTML5 elements with your own replacements.
<pagination per_page="20" total="500" page="0" base="http://localhost/page?page={page}" mode="smart" adjecents="5" />
PS, if anybody wants to look at the class I've put a download here.
© Stack Overflow or respective owner