Keyword

Re: K2 2.5.4 component questions $this->item...etc

  • Edward Coast
  • Edward Coast's Avatar Topic Author
  • Offline
  • New Member
More
12 years 8 months ago #61385 by Edward Coast
Hello Fotis. Thanks for your reply.

It would be very helpful to developers who want to use K2 to have several pages of documentation that explain the internals of K2 templates and what variables, functions and CSS are part of K2 to be able to distinguish it from Joomla and other plugins. While using print_r and var_dump are fine for debugging, a new developer to K2 shouldn't be required to have to backwards engineer K2 merely to understand how it works to make changes. A new developer's time would be better spend actually getting up to speed quick with developer's documentation and actually make changes for their employer. For example, In:
templates/youplus/html/com_k2/default/item.php my client wants to have the order changed in which some of those sections appear. Anyone doing that is in for an unpleasant surprise that the solid and dotted lines are part of the CSS for those sections and can't be controlled separately. A brief document explaining how they work would be extremely helpful and suggestions of how to make changes to K2 which are most commonly done very helpful. That is, until K2 works like the rest of Joomla with module control so it doesn't require a programmer's time to move sections around on the page.

Another example:
<!-- Plugins: BeforeDisplay -->
        <?php echo $this->item->event->BeforeDisplay; ?>

        <!-- K2 Plugins: K2BeforeDisplay -->
        <?php echo $this->item->event->K2BeforeDisplay; ?>

A few sentences of what the above code means would be very helpful. What are they there for? Why are they needed? When are the needed? A new developer can't be expected to delete them and if they see no difference proceed, because the result could be dangerous in a production environment or have no impact at all.

I understand that working with the same code for a long period of time it might look obvious to you and some others, I understand that but someone new to it can certainly benefit from the kind of documentation I'm talking about.

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


Powered by Kunena Forum