Welcome Guest, Not a member yet? Register   Sign In
combat the asset_helper and base_url
#11

[eluser]Guardian[/eluser]
Instead htaccess rewrite you can use html base tag:
base tag
#12

[eluser]skunkbad[/eluser]
There is no 1 solution, and that's the beauty of CI. In my apps I have to use a custom url helper because I have to have the base url transformed from HTTPS sometimes.
#13

[eluser]ShawnMcCool[/eluser]
Well, I suppose since my blog is linked as what not to do I should post my response here.

That solution seems to misunderstand the purpose of an asset management subsystem.

The exact implementation of an asset management subsystem would vary from site to site. I’ll lay out one example that is commonly occurring. In this example we operate a site that allows users to create account and upload their own images. Let’s say that they’re uploading profile pictures and images of themselves on vacation. In this example the assets that are being created by the users would optimally be housed on something like S3. However, there may be specific reasons why you want to store the assets locally. Developers working in a local development environment would simply not have access to these assets. The pages would look bare and designers wouldn’t be able to easily work with the design as it would appear when deployed live. It would be the job of the asset helper to point the image calls on the local development environment to the live site’s URL. .htaccess does not provide the level of granular control that an asset management system could.

The purpose of an asset manager is not to shorten calls in code, but to provide a set of tools that allow the developer to easily move or access content in a way that is contextually appropriate for a site.
#14

[eluser]pickupman[/eluser]
Shawn has a good point. I do the same. I actually use a helper with a conditional tag that checks for local dev url or a live url and manipulate the url accordingly.

Shawn, great blog by the way. Some great ideas/practices to learn from. I like your CRUD example you've shown for models.




Theme © iAndrew 2016 - Forum software by © MyBB