zf-boilerplate icon indicating copy to clipboard operation
zf-boilerplate copied to clipboard

baseUrl for public resources.

Open boosis opened this issue 13 years ago • 4 comments

Hi, Great work! I'll be using this for my next project.

I was wondering why you didn't use $this->baseUrl() for the css/js/image files in the layout file?If you extract this to a sub folder, they won't be reachable. (e.g. http://localhost/zf-boilerplate/public/).

So placed css lines with

now it will work where ever you move your project.

boosis avatar Jan 18 '12 15:01 boosis

Hi!

This is a good idea. I will refactor the code to your solution as soon as I find the time.

Thanks so much!

Michael

Am 18.01.2012 16:02, schrieb Bill Yildirim:

Hi, Great work! I'll be using this for my next project.

I was wondering why you didn't use $this->baseUrl() for the css/js/image files in the layout file?If you extract this to a sub folder, they won't be reachable. (e.g. http://localhost/zf-boilerplate/public/).

So placed css lines with

now it will work where ever you move your project.


Reply to this email directly or view it on GitHub: https://github.com/michael-romer/zf-boilerplate/issues/2

Michael Romer Wichertstrasse 38a, D-10439 Berlin Tel.: +49 30 440 363 55 Fax: +49 322 264 345 31 Mobil: +49 151 235 334 09 e-Mail: [email protected] Skype: Michael_Romer

Liviato.de - Wir machen Bücher kurz + klein! Erento.com - Alles online mieten

michael-romer avatar Jan 18 '12 21:01 michael-romer

Thanks for the reply.

You can use baseUrl for internal links as well. So instead of

link You can use link

-----Original Message----- From: michael-romer [mailto:[email protected]] Sent: 18 January 2012 21:50 To: Bill Yildirim Subject: Re: [zf-boilerplate] baseUrl for public resources. (#2)

Hi!

This is a good idea. I will refactor the code to your solution as soon as I find the time.

Thanks so much!

Michael

Am 18.01.2012 16:02, schrieb Bill Yildirim:

Hi, Great work! I'll be using this for my next project.

I was wondering why you didn't use $this->baseUrl() for the css/js/image files in the layout file?If you extract this to a sub folder, they won't be reachable. (e.g. http://localhost/zf-boilerplate/public/).

So placed css lines with

now it will work where ever you move your project.


Reply to this email directly or view it on GitHub: https://github.com/michael-romer/zf-boilerplate/issues/2

Michael Romer Wichertstrasse 38a, D-10439 Berlin Tel.: +49 30 440 363 55 Fax: +49 322 264 345 31 Mobil: +49 151 235 334 09 e-Mail: [email protected] Skype: Michael_Romer

Liviato.de - Wir machen Bücher kurz + klein! Erento.com - Alles online mieten


Reply to this email directly or view it on GitHub: https://github.com/michael-romer/zf-boilerplate/issues/2#issuecomment-3553773

boosis avatar Jan 18 '12 21:01 boosis

This is good to know. I wasn't aware of the baseUrl trick yet, but it fully makes sense.

Thanks!

Am 18.01.2012 22:51, schrieb Bill Yildirim:

Thanks for the reply.

You can use baseUrl for internal links as well. So instead of

link You can use link

-----Original Message----- From: michael-romer [mailto:[email protected]] Sent: 18 January 2012 21:50 To: Bill Yildirim Subject: Re: [zf-boilerplate] baseUrl for public resources. (#2)

Hi!

This is a good idea. I will refactor the code to your solution as soon as I find the time.

Thanks so much!

Michael

Am 18.01.2012 16:02, schrieb Bill Yildirim:

Hi, Great work! I'll be using this for my next project.

I was wondering why you didn't use $this->baseUrl() for the css/js/image files in the layout file?If you extract this to a sub folder, they won't be reachable. (e.g. http://localhost/zf-boilerplate/public/).

So placed css lines with

now it will work where ever you move your project.


Reply to this email directly or view it on GitHub:

https://github.com/michael-romer/zf-boilerplate/issues/2

Michael Romer Wichertstrasse 38a, D-10439 Berlin Tel.: +49 30 440 363 55 Fax: +49 322 264 345 31 Mobil: +49 151 235 334 09 e-Mail: [email protected] Skype: Michael_Romer

Liviato.de - Wir machen Bücher kurz + klein! Erento.com - Alles online mieten


Reply to this email directly or view it on GitHub: https://github.com/michael-romer/zf-boilerplate/issues/2#issuecomment-3553773


Reply to this email directly or view it on GitHub: https://github.com/michael-romer/zf-boilerplate/issues/2#issuecomment-3553802

Michael Romer Wichertstrasse 38a, D-10439 Berlin Tel.: +49 30 440 363 55 Fax: +49 322 264 345 31 Mobil: +49 151 235 334 09 e-Mail: [email protected] Skype: Michael_Romer

Liviato.de - Wir machen Bücher kurz + klein! Erento.com - Alles online mieten

michael-romer avatar Jan 18 '12 21:01 michael-romer

Hi,

It could be used on the form too, setting the correct action. For example in the AddQuote form

$this->setAction($this->getView()->baseUrl('/index/add-custom'));

I got not found page for the first time since I develop in subfolders (http://localhost/projectName)

Anyway your project is great ! I liked it

dextervip avatar Jan 31 '12 03:01 dextervip