This is a follow-up to the question I just asked. It was suggested that I can use url_for() in yaml files if I load the helper. So I did. But now url_for() is giving me mangled urls.
I'm doing this in app.yml:
janrain_rpx_login_processing: '<?php echo url_for('user/rpxLogin', true) ?>'
and in the template I call it like this:
<?php echo sfConfig::get('app_urls_janrain_rpx_login_processing') ?>
and I'm getting this:
Any thought why it would mash the URL like that?
janrain_rpx_login_processing: '<?php echo url_for('user/rpxLogin') ?>'
gives me this:
Why? Is there a better function to use than url_for()?
Pierre Minnieur answers:
Just store the name of the route in your YAML file. You can then use url_for(sfConfig::get('app_urls_janrain_rpx_login_processing')) to render the link in your templates. That's a common approach and is widely used (e.g. sf*GuardPlugin).
Lawrence Krubner comments:
So I can not use URL methods in the yaml file? You are suggesting that this is impossible?