Keyword

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 #61255 by Edward Coast
I'm very new to K2. I am trying to modify the template and create some new ones, but I can't find any programmer's documentation.

When I see K2 PHP programming code to reference items like $this->item how can I find out what $this contains? Furthermore, where are these routines being stored so I can see them all? Here are just some I see in the PHP code but don't know where the library(?) of this code is:
<?php if($this->params->get('show_page_title)): ?>

echo $this->loadTemplate('item');


Where is the function get?
Where is the function LoadTemplate?

And the big question, what OTHER functions such as these are available and where do I find them? Thanks for your time.

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

More
12 years 8 months ago - 12 years 8 months ago #61256 by Nick
Apparently you have never heard of MVC frameworks? :)

Either way, it's a popular way of structuring your applications with a Model a View and a Controller.

These functions are stored in the Model found in com_k2/models

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

More
12 years 8 months ago #61257 by JoomlaWorks
Replied by JoomlaWorks on topic Re: K2 2.5.4 component questions $this->item...etc
@Edward I'm sure Nick was trying to be helpful. Either way, if you wish to see what $item or any php variable outputs anywhere, you can use the var_dump function. Just do var_dump($item); inside a php block, close to where you see a reference to $item->something. More here on var_dump: php.net/manual/en/function.var-dump.php

Start with the above and you will see what content K2 can output at any given time.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum