A friend asked me how to create links between different apps. I suggested this cookbook link:
However, his site is running Symfony 1.0. So I pointed him to this post by the always insightful Scott Meves:
But he doesn't want to record absolute links anywhere.
Are there any other ways to create links between apps on a Symfony 1.0 site?
Try adding a new route in your routing.yml file from the application you want to make a link.
For example you are adding a link to an action called "logout" which is managed under "usersession" module in an application called "login".
So you need to add:
Now in your template file you add:
<a href="<?php echo url_for('@logout') ?>">Log Out</a>
Hope this example is clear to help you creating cross apps links
There's a symfony 1.0 plugin for cross application links: [[LINK href="http://www.symfony-project.org/plugins/pmCrossAppUrlPlugin"]]pmCrossAppUrlPlugin[[/LINK]]
In sfDoctrineSimpleCMSPlugin they have cross_app_link_to helper: [[LINK href="http://trac.symfony-project.org/browser/plugins/sfDoctrineSimpleCMSPlugin/branches/symfony-1.0/lib/helper/CrossApplicationHelper.php?rev=9530#L1"]]CrossApplicationHelper.php[[/LINK]]
And here's another variation of that function: [[LINK href="http://symfonier.blogspot.com/2009/03/cross-app-link.html"]]cross-app-link[[/LINK]]
Maybe it will help
But that is not Symfony 1.0?
> But that is not Symfony 1.0?
According to blog and plugin ( http://www.symfony-project.org/plugins/swCrossLinkApplicationPlugin ) of blog's author it's 1.2.
This plugin is for Symfony 1.1
I think the best way to do it is the Scott Meves method.
Sf is not aware of other applications when the front controller is loaded and the method you're using to access them (subdomains, subdirectories in the web directory or renamed front controller php files).
If you are using Apache, maybe you can define some rewrite rules (look for the sample .htaccess file in your sf project) for example, using the "convention over configuration" principle.