1

I have successfully built my own custom joomla component from scratch, but I am stuck on a presumably relatively simple problem.

For the purpose of this example lets say that:

A equals Home page

B equals Player(Multiple) list page

C equals Player(Individual) page

I have so far got part A and C working. I can get to my individual player page by entering in their id into the url.

Example of part C

What I am unsure about now is creating a view before this when you click on the players menu button that it directs you to a view which displays a list of all players. I have already created a function within the model which returns all players in the database for the purpose of this view. I can upload my component or paste any of my code into this post if needed.

I did follow Joomla component on how to create a component so I presume I have the default settings for my component.

2
  • just create another view, i am not sure where is the problem?
    – Marko D
    Mar 13, 2013 at 12:13
  • Like Marco D said, create another view, then link to your detail view in the actual page. That's generally how listings/detail pages work.
    – seavers
    Mar 13, 2013 at 22:23

2 Answers 2

0

You can at an extra public function in your controller this one get available as "task" and can be accessed like this:

/index.php?option=com_name-of-component&view=view-to-load&format=raw&task=name-of-function

If this function get's to big you can create a multi controller component. I can not explain better than this:

Using Multiple Controllers in Joomla Component Development

0

If you build your component in the Component Creator for Joomla, you can probably just use the component it makes for you or you can view the code it generates and copy paste (or at least learn) from the code generated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.