ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

menu link to contact form

November 17, 2010 9:55am

Subscribe [3]
  • #1 / Nov 17, 2010 9:55am

    welshartnow

    81 posts

    I’m working localhost/EE2. I have created a template for my contact form, when I view it within EE the URL is http://localhost/index.php/muckaround/contact_form .  I want to include a menu link from my homepage to this contact form. I’m struggling to get the correct URL, I’ve tried “/contact_form” but twith no luck.  My question is how do I link to this contact page?

  • #2 / Nov 17, 2010 5:25pm

    Ingmar

    29245 posts

    There are various way, but

    <a href="/index.php/muckaround/contact_form"> ...

    should work. Moving to the CodeShare Corner.

  • #3 / Nov 18, 2010 8:58am

    welshartnow

    81 posts

    Hi,
    Thank you for reply.  I’ve decided to use the path variable to the templatefam/template ie _That works just fine for me and seems a neat way to do it.  However when I try to code my ‘home’link in the same way as <a href=”{path='index'}”>Home it does not work.  Could you please advise how I code my home link using the path template variable?

  • #4 / Nov 18, 2010 9:30am

    Boyink!

    5011 posts

    I’d recommend either:

    <a href="http://{homepage}">Home</a>

    or

    <a href="http://{site_url}">Home</a>

    The difference being the former will return a link including index.php and the latter will not. I prefer the latter.

  • #5 / Nov 18, 2010 9:41am

    welshartnow

    81 posts

    Thank you that worked a treat. Just out of interest would you advise not to use the path tag for menu links?

  • #6 / Nov 18, 2010 9:56am

    Boyink!

    5011 posts

    No I absolutely would use them. 😊

  • #7 / Nov 18, 2010 9:58am

    welshartnow

    81 posts

    Thanks for the help and advice

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases