Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Unique styling identifiers for links

Unique styling identifiers for links 9 years 10 months ago #23453

  • BodgeIT
  • BodgeIT's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 88
  • Thank you received: 0
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
<a $class href="...

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
class='detailslink';
and changed the html to read
<a class="'.$class.'"
This is much cleaner and can be manipulated more easily. So in the helper, you can add a single line like:
$class .= ' full';

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:
  1. There is better seperation in the MVC for instances like above
  2. Unique identifiers to highlight differences where possible
  3. 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).

Please Log in or Create an account to join the conversation.

Last Edit: by BodgeIT.
  • Page:
  • 1
Time to create page: 1.099 seconds