logo
Ask your Symfony questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$10
How to create links between different apps

A friend asked me how to create links between different apps. I suggested this cookbook link:

http://www.symfony-project.org/cookbook/1_2/en/cross-application-links

However, his site is running Symfony 1.0. So I pointed him to this post by the always insightful Scott Meves:

http://stereointeractive.com/blog/2007/06/18/linking-between-apps-within-symfony/

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?

This question has been answered.

Lawrence Krubner | 05/28/10 at 1:56pm Edit


(7) Responses

See a threaded view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    05/28/10
    4:30pm
    burgua says:

    Maybe it will help

    http://rabaix.net/en/articles/2009/05/30/cross-link-application-with-symfony

    Previous versions of this answer: 05/28/10 at 4:30pm

  • avatar
    Last edited:
    05/28/10
    2:35pm
    Arturo Linares says:

    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).

  • avatar
    Last edited:
    05/29/10
    3:28pm
    Juan Guillermo GarcĂ­a says:

    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:


    #routing.yml

    logout:
    url: ../login.php/usersession/logout


    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

    Previous versions of this answer: 05/28/10 at 2:42pm

  • avatar
    Last edited:
    05/28/10
    10:41pm
    Martin Palacio says:

    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.

  • avatar
    Last edited:
    05/29/10
    3:28pm
    Jakub Zalas says:

    There's a symfony 1.0 plugin for cross application links: pmCrossAppUrlPlugin

    In sfDoctrineSimpleCMSPlugin they have cross_app_link_to helper: CrossApplicationHelper.php

    And here's another variation of that function: cross-app-link

    Previous versions of this answer: 05/29/10 at 3:09pm | 05/29/10 at 3:13pm | 05/29/10 at 3:14pm

  • avatar
    Last edited:
    05/28/10
    8:23pm
    Lawrence Krubner says:

    But that is not Symfony 1.0?

  • avatar
    Last edited:
    05/29/10
    2:09am
    burgua says:

    > 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
    http://www.symfony-project.org/plugins/sfLinkCrossAppPlugin

This question has expired.





Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.