Hi everyone.
I want to implement detailpage (like in album or news) in my module but i dont know how to do it? Can somebody explain how?? Please.
[solved]how to implement detailpage in module??
[solved]how to implement detailpage in module??
Last edited by piotrekkr on Thu Apr 12, 2007 10:16 pm, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: how to implement detailpage in module??
It's easy...... here's the code:
Now, just use $detailpage instead of $returnid in your links. i.e:
Hope this helps.
Code: Select all
$detailpage = '';
if (isset($params['detailpage']))
{
$manager =& $gCms->GetHierarchyManager();
$node =& $manager->sureGetNodeByAlias($params['detailpage']);
if (isset($node))
{
$content =& $node->GetContent();
if (isset($content))
{
$detailpage = $content->Id();
}
}
else
{
$node =& $manager->sureGetNodeById($params['detailpage']);
if (isset($node))
{
$detailpage = $params['detailpage'];
}
}
}
Code: Select all
$thereturnid = $returnid;
if( $detailpage != '' )
{
$params['origid'] = $returnid;
$thereturnid = $detailpage;
}
$oneentry->morelink = $this->CreateLink($id,'default',$thereturnid,
$this->Lang('prompt_more'),$params);
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: how to implement detailpage in module??
It's working, thanks! 
