Situation 1
This code goes through my bootstrap and produces the expected page: $this->view->render(‘checkIndividualPricesPostSetups/index’,$data);
Situation 2
I understand why this code throws a fatal error (file doesn’t exit - I get that): $this->view->render(‘checkIndividualPricesPostSetups#c5/index’,$data);
Your anchor should be at the end of the URL.
I’m not knowledgeable with your code however I think for point number 2 you should have checkIndividualPricesPostSetups/index#c5 instead of checkIndividualPricesPostSetups#c5/index.
Edit: However I’m not sure how much sense it makes to render that page with the anchor as the anchor is used in the browser’s URL to jump to a particular section of the page and not sure what you’re expecting to happen when you tell your page to render with an anchor
When you type “my.com/checkIndividualPricesPostSetups#c5” into a browser, the browser strips off the #c5 and send the rest to the server which is handled by situation 1 in your question.
A full page is generated and sent back to the browser. The browser renders it and then scrolls to id=c5.