Results 1 to 6 of 6

Thread: insert tag for referer article name

  1. #1
    New user
    Join Date
    07-10-09.
    Posts
    13

    Default insert tag for referer article name

    I'm looking for a solution that will provide an insert tag with the value of a referring articles name. I have tried parsing the {{env::referer}} tag with no success. As an example :

    If the referer url is http://mysite/my_page.html I want the value my_page to be returned.
    Any assistance appreciated.

  2. #2
    User
    Join Date
    06-20-09.
    Location
    Spain
    Posts
    43

    Default Re: insert tag for referer article name

    {{env::request}}

    This insert tag will be replaced with the current request (e.g. home.html).

    This one doesn't work?
    ===
    Fernabel

  3. #3
    User
    Join Date
    06-19-09.
    Posts
    41

    Default Re: insert tag for referer article name

    Hi lshore,
    1.
    with no success
    what does that mean, what did the tag return? Nothing?

    2. Normally (using url rewrite etc.), the tag will return the alias, not the name. And it will normally return the page alias, not the article alias (unless the latter has been written to url). Article alias would also get problematic as soon as you've more than one article in the referer page.

    3. The tag will return the full path. If you want to retrieve "home.html" you'd have to use [code=php:2bdlo8gr]<span class="syntaxdefault">$_SERVER</span><span class="syntaxkeyword">[</span><span class="syntaxstring">'REQUEST_URI'</span><span class="syntaxkeyword">]</span><span class="syntaxdefault">*</span>[/code:2bdlo8gr].


    cheers
    Antipitch

  4. #4
    New user
    Join Date
    07-10-09.
    Posts
    13

    Default Re: insert tag for referer article name

    The suggestions above don't help me I'm afraid. As a true example:
    I have a number of product pages, each page is called page name.html (product1.html, product2.html etc) and I want to have a single request form for all products with a link to the form from each page. The idea is to use page name:

    As a hidden field in the form to identify the product;
    Within a page header e.g. "Information request for Product1";
    and possibly as a conditonal field.

    I'm looking for an insert tag that will give me {{xxx::referer_page name}}.
    I suspect the catalogue module will do all I want but it may be over the top for this particular site.

  5. #5
    User
    Join Date
    06-19-09.
    Posts
    41

    Default Re: insert tag for referer article name

    Hi lshore,

    a quick way to do that would be to

    1. Set up a custom HTML module, that generates the link 2. Install the extension inputvar and with that catch the get parameter in the form page (or the form itself). But be careful, the extension doesn't do any security checks.


    cheers
    Antipitch

  6. #6
    New user
    Join Date
    07-10-09.
    Posts
    13

    Default Re: insert tag for referer article name

    Thanks - I'll give that try

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •