As I am new to Umbraco, I have not quite understood the routing mechanisms it seems to have.
I have a custom surface controller myProject.Controllers.CompanySurfaceController
with a getCompanyList()
and getCompany(int companyId)
function.
The basic idea is to get the list of companies from the db, render the partial view with classic <a>
links to the getCompany(..)
function and retrieve/display that company from the db.
Everything is working fine except one thing: I cannot grasp how to create the <a>
links to the child action of the controller! I have no problem including child actions in partial views when POSTing and using Html.Action.
I have tried @Html.ActionLink
and other helpers but the closest I get to, is a link for /umbraco/Surface/CompanySurface/Company
, which doesn't work of course and it does not include the id parameter (e.g. Company/3
).
I have also tried to put the controllers in the umbraco/Surface
namespace without luck (and it does not seem necessary).
What am I missing here?