FuelCMS butts heads with Codeigniter? Well, it can... but needn't!

edited October 2011 in Feature Requests
I'd like to use the Codeigniter img() function from the HTML helper with the FuelCMS assets_path() function from the Asset library, they look like they'd play nice together. However, using them like this:

img(assets_path($row['photo_file'], 'photos')) ;

results in a nasty url with a closing '/' from the img() function and an opening one from assets_path(), repeating the subfolder if present (eg if the application was in a subfolder of the server context eg "/folder" you get "/folder//folder/..."). Without some unpleasant substringing, is this unavoidable?

Comments

  • edited October 2011
    Good news! I answered my own question, By using the 4th argument of assets_path() declaring the url absolute, img() must acknowledge this and doesn't interfere, so the working usage becomes:

    img(assets_path($row['photo_file'], 'photos', NULL, TRUE));
Sign In or Register to comment.