Thursday, October 19, 2017

Who's Online

None

Some people think they hate computers, what they really hate is lousy programmers.

 
             
Welcome, Guest
Username: Password: Remember me

TOPIC: calling a specific Itemid??

calling a specific Itemid?? 8 years 5 months ago #74

  • sfutterer
  • sfutterer's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
I'm making some site specific edits to a mambot plugin. I would like to force an itemid to be = to \"Itemid=1057\"

The code calling the item is is:

[code:1]foreach($this->_listmodule as $m){
$order++;
$secid = $m->id;
$mid[] = $secid;
//print_r($this->_sectionparams->toString());exit();
if(!isset($this->_listmenu[$secid])){
$query = \"INSERT INTO #__menu (`menutype`, `name`, `link`, `type`, `published`, `parent`, `componentid`, `sublevel`, `ordering`, `checked_out`, `checked_out_time`, `pollid`, `browserNav`, `access`, `utaccess`, `params`) VALUES \";
$query .= \"('{$this->_menutype}', '\".$m->title.\"', 'index.php?option=com_alphacontent&section=\".$secid.\"', 'content_blog_section', \".$m->published.\", 0, $secid, 0, $order, 0, '0000-00-00 00:00:00', 0, 0, 0, 3, '\".$this->_sectionparams->toString().$this->_gparams->toString().\"\nsectionid=$secid')\";
$this->_db->setQuery($query);

$this->_db->query();

$insertid = $this->_db->insertid();
$listcategories = $this->getCategories($secid);

[/code:1]

This section of code builds a menu link based on alphacontent component/section link structure. My question is how do I edit the $insertid = $this->_db->insertid(); line to call Itemid=1057??
The administrator has disabled public write access.
Moderators: ElectronicMother
Powered by Kunena Forum