Your controller defines $data['ctgparent_name'] and $data['ctgparent_description'], then passes $data to the view. So, in the view, you would access this data as $ctgparent_name and $ctgparent_description.
As arma7x mentioned, you didn't show any code which defines $posts in the view or $data['posts'] in the controller, though I'd have to assume that it's defined somewhere, since you're not getting an error on the foreach() loop (unless you're calling $data somewhere before the view code you've included here).