Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

baseUrl for public resources. #2

Open
boosis opened this issue Jan 18, 2012 · 4 comments
Open

baseUrl for public resources. #2

boosis opened this issue Jan 18, 2012 · 4 comments

Comments

@boosis
Copy link

boosis commented Jan 18, 2012

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.

@michael-romer
Copy link
Owner

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:
#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: mail@michael-romer.de
Skype: Michael_Romer

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

@boosis
Copy link
Author

boosis commented Jan 18, 2012

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:reply@reply.github.com]
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:
#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: mail@michael-romer.de
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:
#2 (comment)

@michael-romer
Copy link
Owner

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:reply@reply.github.com]
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:

#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: mail@michael-romer.de
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:
#2 (comment)


Reply to this email directly or view it on GitHub:
#2 (comment)

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: mail@michael-romer.de
Skype: Michael_Romer

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

@dextervip
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants