This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

[SOLVED] link for an Iphone website

Discussion relating to version 1.2.x stable

[SOLVED] link for an Iphone website

by yaya23 » Mon Mar 01, 2010 6:22 pm

Hello,

I'm making on IPhone version of my website. I have some issue in my template.
It seems I can't use the link_to helper.

Here is my template :
Code: Select all
<li class="listRowTemplate_template" style="visibility: visible;">
<a href="calendrier/listPremiere">
 <span>
   <div class="menu_title">Premiere</div>
   <div class="menu_chevron"></div>
 </span>
</a>
</li>


I must have the link in the <li> and around the <span>
But like this, I have issues : sometimes, depending on which other page I come from, the route is not found.
For instance : instead of
http://localhost:8223/www/mobi_dev.php/calendrier/listPremie re
it search for http://localhost:8223/www/calendrier/listPremiere
and of course, it's not working.

If someone had an idea ? Eventually, if I could use the link_to helper without breaking all my template, thanks a lot
yaya23
Senior Member
 
Posts: 102
Joined: Thu Oct 18, 2007 11:09 am

Re: link for an Iphone website

by halfer » Mon Mar 01, 2010 6:54 pm

I think I would avoid that approach anyway - you are inserting block-level tags inside span-level tags. A <span> inside <a> is fine, but <div> inside <span> or <div> inside <li> is not. I've just popped it into Eclipse to confirm, and it brings up an "unexpected tag" error - i.e. this won't validate.
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: link for an Iphone website

by yaya23 » Tue Mar 02, 2010 10:23 am

except it does exactly what I need on an Iphone...

and this is not the issue. The issue is the routing.

if one had the complete solution, I would like that :)~ :-)~ :smile:
yaya23
Senior Member
 
Posts: 102
Joined: Thu Oct 18, 2007 11:09 am

Re: link for an Iphone website

by yaya23 » Tue Feb 15, 2011 5:48 pm

hello,

well, I still have my issue...need to use href, and it's not completing correctly the app name. So, it's not working.
I know, it's been a long time since my last post ! My Iphone website is still in progress...

Any help would be appreciated.

Thanks
yaya
yaya23
Senior Member
 
Posts: 102
Joined: Thu Oct 18, 2007 11:09 am

Re: link for an Iphone website

by yaya23 » Thu Feb 17, 2011 8:07 pm

I finally figured out how to do it :)
I'm building the absolute URL in the action, and that's what I print in the href.

it's working nice, finally !!
yaya23
Senior Member
 
Posts: 102
Joined: Thu Oct 18, 2007 11:09 am

Re: [SOLVED] link for an Iphone website

by tylerehrman598 » Sat Nov 26, 2011 5:23 am

Hello there yaya23 I also figure it out but I'm experiencing a sort of problem but I'll be back as soon as I solved it.
tylerehrman598
Junior Member
 
Posts: 1
Joined: Wed Nov 23, 2011 7:40 am