Welcome Guest, Not a member yet? Register   Sign In
help needed about logic.
#1

[eluser]demiRon[/eluser]
Hi;
i'm try to build new app. News Portal.

i want to make a class which is complete solution for site navigation.

i mean:

segments -> http:/xxxxx. com/content/maincategory/subcategory
Contents related with subcategory.

Code:
class Content extends Controller
{
function __construct()
{
  parent::Controller();
}

function index()
{
  // this is Main Category calls first SubCategory
  //some data array
  $this->parser->parse('theme/'.$theme.'/cont', $data);
}

function subcat($subcat)
{
  //some data array $subcat
  $this->parser->parse('theme/'.$theme.'/cont', $data);
}

}

Now; i get this values; but i want to get these values at begin.
i tried to move these in __constructor but i get many errors like "unexpected T_VARIABLE"
Code:
$cat  =$this->uri->segment(2, 0);
$acat =$this->uri->segment(3, 0);

Ps: sorry for my bad eng.


Messages In This Thread
help needed about logic. - by El Forum - 04-25-2010, 05:19 AM
help needed about logic. - by El Forum - 04-25-2010, 05:26 AM
help needed about logic. - by El Forum - 04-25-2010, 05:55 AM
help needed about logic. - by El Forum - 04-25-2010, 05:58 AM
help needed about logic. - by El Forum - 04-25-2010, 06:10 AM
help needed about logic. - by El Forum - 04-25-2010, 06:17 AM
help needed about logic. - by El Forum - 04-25-2010, 06:24 AM
help needed about logic. - by El Forum - 04-25-2010, 06:36 AM
help needed about logic. - by El Forum - 04-25-2010, 06:49 AM
help needed about logic. - by El Forum - 04-25-2010, 06:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB