Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8695777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:07:09+00:00 2026-06-13T01:07:09+00:00

Trying to figure out how to use haml link_to with Ruby code in order

  • 0

Trying to figure out how to use haml “link_to” with Ruby code in order to make an image on a page link to another page on the site. If possible I’d like to keep the nav static and fade the two pages in and out via a “Forward” and “Back” image. Any ideas? Just want to get the linking right first and then can go in and figure out the JQuery. Currently have the code below…

Thanks!!

    .pad-bottom50
    %div{:style => "position: absolute; top: 620px; left: 830px;"}
        =link_to (image_tag(@page.photos[1].image_url(:full), :id => "#fade1", :class => "animated") if @page.photos[1].image? 
    .pad-top20  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:07:10+00:00Added an answer on June 13, 2026 at 1:07 am

    Syntax of link_to is

    =link_to link_text, link_url, options
    

    You missed the link_url. ie. to where the user should be taken when clicking on the image.

    Here is a working example

    =link_to(image_tag("http://goo.gl/FZUI3"), "http://en.wikipedia.org/wiki/Nyan_Cat", :id => "#fade1", :class => "animated")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to figure out how to use Emacs Code Browser (ECB) and one
I am trying to figure out how to use jquery to take an image
I am trying to figure out how to use the new EF Code First
Im trying to figure out how to use a column from another model in
I'm trying to figure out how to use CompositeId to map another class. Here's
I started to use HAML today and I'm still trying to figure out, how
I'm trying to figure out how to use the 'image.getRgb()' API. for testing, I
I am trying to figure out how to use the code posted by Nicholas
I'm trying to figure out how to use a variable in code for databinding
At the moment I'm trying to figure out how use default and custom settings

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.