I use application.html.erb to do my styling (span-1 to span-24) and
divide
it into various sections. Namely, logo, header1, then col1, Content
area,
col2 then footer.
Now assume, I have 10 pages (all static) which is from menu->submenu.
When I click on menu ->submenu -> item then I want the description to be
displayed in the content area. Which I achieved by doing <%= yield %>.
All
fine.
Now I want image 1 to be in col1 and corresponding content in body when
the
appropriate selection is done. Like that for all 10 selections (which
could
come from submenus).
I am not able to get the correct image and the correspoding content
displayed.
Actually, I have some text in in text(1…10).html.erb and for each of
these
files I have image(1…10). Whenever I load text(1…10) in content area
I
want to load the image(1…10) in col1 area.
ie. if text1 is in content area then I want image1 in col1 area
…
…
if text10 is in content area then I want image10 in col1 area
Hi,
I don’t understand your question.
Actually, I have some text in in text(1…10).html.erb and for each of these
files I have image(1…10). Whenever I load text(1…10) in content area I
want to load the image(1…10) in col1 area.
ie. if text1 is in content area then I want image1 in col1 area
…
…
if text10 is in content area then I want image10 in col1 area
Please don’t top post, it makes it difficult to follow the thread.
Insert your reply in the previous message at the appropriate points.
Thanks
I think Jim is probably right, content_for may be what you want, in
conjunction with multiple yield statements
yield :content
yield :col1
or something like that.