Welcome Guest, Not a member yet? Register   Sign In
Absolute "noob" questions
#21

[eluser]tdktank59[/eluser]
duh...

in htaccess change the bold line to go to the correct directory.
The way thats setup is to go to the root of the domain in your case
localhost...

so change it to something like /folder/

Code:
RewriteBase /
#22

[eluser]callumd[/eluser]
*EDIT*

I rebooted Apache, it's working now.

Thanks very much.
#23

[eluser]tdktank59[/eluser]
glad to be able to help

It took me a while to find it and I ended up looking at good for the answer
#24

[eluser]Randy Casburn[/eluser]
[quote author="callumd" date="1225249912"][quote author="inparo" date="1225248447"]There is a CI_VERSION constant that is set in system/codeigniter/codeigniter.php (near the top).[/quote]
Thanks, I'm using 1.7.0.

Randy, I do apologise [/quote]

No need to apologize...after re-reading my post I can see where I made too many assumptions with what I had said. I should have been more precise in my meaning.

To that end, 1.7.0 is a brand new release and the error I helped you with was a simple oversight in the new release. SVN stands for Subversion which is a software versioning system. All the latest patches are stored there. So the "fix" for this problem has already been released into the version control system.

No big deal. I'm glad we got that part (the DB) working for you.

Randy
#25

[eluser]callumd[/eluser]
Another question.

I'd like to include a header and footer at the beginning and end of each "view". How should I do this?

Should I call them in the relevant function in the controller, or should I call them in the view itself?

And why?

Thanks.
#26

[eluser]callumd[/eluser]
Also,

I'm assuming any 'images' or 'styles' folders should be hung off the application directory, yes?
#27

[eluser]callumd[/eluser]
[quote author="callumd" date="1225535299"]Another question.

I'd like to include a header and footer at the beginning and end of each "view". How should I do this?

Should I call them in the relevant function in the controller, or should I call them in the view itself?

And why?

Thanks.[/quote]
Having snooped around a bit on this, it seems as though one common way to go is to have a basic "layout" view that includes the header and footer, and when the controller calls it, it simply passes a content view to it.

Is that the way to do it?
#28

[eluser]callumd[/eluser]
Righto,

Where is the proper place to put "styles" (CSS) folders and "images" folders?

Initially I was putting them in my system/application directory.

When I realised I was unable to create a dynamic link to the CSS file in my header_view include, I have since moved the folders to the root directory.

This may be a silly question, but is that the correct place for them to be?
#29

[eluser]callumd[/eluser]
What is the correct way to access the base URL value in the config file?

Is it to use;

$this->config->item('base_url')

.. or to load the URL helper and use the base_url() function?
#30

[eluser]Randy Casburn[/eluser]
[quote author="callumd" date="1225535299"]Another question.

I'd like to include a header and footer at the beginning and end of each "view". How should I do this?

Should I call them in the relevant function in the controller, or should I call them in the view itself?

And why?

Thanks.[/quote]

Answer:

A couple of different ways. Here is the code:

Code:
$data = $this->load->view('header');
$this->load->view('MyView');
$data = $this->load->view('footer');

Code:
<HTML>
<HEAD><HEAD>
<BODY>
<?=$this->load->view('header','',TRUE);?>
<div id='mySpecialPageStuff'>Hello World</div>
&lt;?=$this->load->view('footer','',TRUE);?&gt;
&lt;/BODY




Theme © iAndrew 2016 - Forum software by © MyBB