I have recently switched from the "ugly" buttons used in DT Register and used links instead. I thought I could simply add classes in a template override so that I could create my own button styles the same as my template.
I should have known "simply" would be the understatement of the year. Because of the way some things are done in DTRegister, there is no easy way to add a class to links. I have had to resort to changing core files in DTRegister and the Dtregister event link plugin to achieve my needs.
Currently all the links still end up the same class 'detailslink'. I can override the 'Details' link in the list-row.php tmpl override but the other links (ie 'Register, Full & Closed') are created in the helper file /components/com_dtregister/administrator/helper/dt_register.php and are returned to the template without identifiers. If I add a class in the override, they all come out with the same style. They each need to be returned with some unique identifier.
This isnt helped with the way things are coded, small example:
In the list-row.php file you set a variable $class then set it so:
$class='"class=detailslink"';
html is
Not trying to make a point but that is not cool. It's not possible to append to that using any other code.
I have changed this to
and changed the html to read
This is much cleaner and can be manipulated more easily. So in the helper, you can add a single line like:
which returns 'detailslink full' to the tmpl. So easy to style that.
Also none of these links use the alt="" or title="", something of an SEO faux pas.
So my feature request is that:
- There is better seperation in the MVC for instances like above
- Unique identifiers to highlight differences where possible
- Option for 'link class' in both component & plugin, so that it is easy to style links to suite template.
Option 3 above should be seperate or if not the plugin should follow Option 2 and have some sort of unique identifier. This will allow for different styles for the plugin links(i.e. bigger).