List and Detail View

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
gawarski
New Member
New Member
Posts: 7
Joined: Wed Aug 11, 2010 8:36 pm

List and Detail View

Post by gawarski »

I am trying to set up a "list" and "detail" system for a module I'm writing, and I'm not sure how to handle this.

I have a list of projects, and for each project, there should be a link to a details page for that project.

The project list has code to generate a link:

$list[$i]['imgallery'] = $this->CreateLink($id, 'details', $returnid, "Details", array('project_id'=> $row['id']));

I insert the resulting link into the template file, and it shows up, but when you click the link, it keeps loading the "listing" view.  The page that launches this view has the following tag:

{cms_module module="Project"}
NaN

Re: List and Detail View

Post by NaN »

We need more info about your module.
How does the url of the details link look like?
Is there an "action.details.php" in your module that performs the details view?
Is there a {content} tag in your template?

Do you want to replace the content with the details view or the module output?
Take a look at the API doc of the function CreateLink().
There is a param "inline" to specify this.
Post Reply

Return to “Developers Discussion”