Re: [Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-31 Thread David Pollak
I was in SiteMap for another project today.  I'll add a flag on the SiteMap
object that facilitates / rather than /index.

On Wed, Dec 30, 2009 at 7:47 PM, Alex Black a...@alexblack.ca wrote:

 Would it be reasonable for me to open a ticket to allow people to
 change this default behaviour?  Its important to me that when people
 are at our site's home page, its just http://oursite.com;, not
 http://oursite.com/index;.

 Then for people who are using a container where this is a problem, it
 will work fine, but others can avoid the index in the url.

 - Alex

 On Dec 30, 12:49 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  On Wed, Dec 30, 2009 at 9:43 AM, Alex Black a...@alexblack.ca wrote:
In a 1.1-M8 based project,
  http://localhost:8080/andhttp://localhost:8080/indexbothcause the
 Home
   menu item to be
non-clickable.  The definition of the Home menu item is
 Menu(Loc(Home,
List(index), Home))
 
   Understood.
 
   However, in this scenario, when the user clicks on home they get
   taken tohttp://localhost:8080/index, I think it would be even better
   if they could be taken tohttp://localhost:8080/.  Its mostly
   aesthetic, but its cleaner/shorter, and it saves having two URLs for
   the same thing (e.g.http://localhost:8080/and
  http://localhost:8080/index).
 
   Is there any way to do that while maintaining the nice Sitemap feature
   that makes Home non clickable?
 
  As I said already, we had thehttp://localhost:8080/as the place where the
  top level takes you.  That broke some containers (I don't remember the
  specifics) so the top level is /index.  There's no way to change it and
 it
  is this way for the reason that I've now had to state twice in two days.
 
 
 
 
 
   - Alex
 
  Also, why do you using Pair(List(...), false)?
 
  Pair is deprecated/frowned on... it's much more idomatic to use
 (List(...),
  false), but that's not needed as there's an implicit conversion
 you
   can
  simply declare the List().
 
 Thanks for the tip.
 
   to
 
  Menu(Loc(index, Pair( :: Nil, false), Home)) ::
 
   So that my Home link goes to mysite.com/ instead of
 mysite.com/
   index.  But, I notice, when you're at mysite.com/ the sitemap
   doesn't
   show Home as selected, is there a way to fix that? Perhaps
 I've
   got
   something wrong here.
 
   Thanks,
 
   - Alex
 
   --
 
   You received this message because you are subscribed to the
 Google
 Groups
   Lift group.
   To post to this group, send email to lift...@googlegroups.com.
   To unsubscribe from this group, send email to
   liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 
   liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com
 
 
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com
 
   liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com
 liftweb%25252bunsubscr...@googlegroups.comliftweb%2525252bunsubscr...@googlegroups.com
 
 
   .
   For more options, visit this group at
  http://groups.google.com/group/liftweb?hl=en.
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Surf the harmonics
 
 --
 
 You received this message because you are subscribed to the Google
   Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 
   liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com
 
 
 .
 For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en.
 
--
Lift, the simply functional web frameworkhttp://liftweb.net
Beginning Scalahttp://www.apress.com/book/view/1430219890
Follow me:http://twitter.com/dpp
Surf the harmonics
 
   --
 
   You received this message because you are subscribed to the Google
 Groups
   Lift group.
   To post to this group, send email to lift...@googlegroups.com.
   To unsubscribe from this group, send email to
   liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/liftweb?hl=en.
 
  --
  Lift, the simply functional 

[Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-31 Thread Alex Black
That sounds great, much appreciated.

On Dec 31, 2:52 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 I was in SiteMap for another project today.  I'll add a flag on the SiteMap
 object that facilitates / rather than /index.



 On Wed, Dec 30, 2009 at 7:47 PM, Alex Black a...@alexblack.ca wrote:
  Would it be reasonable for me to open a ticket to allow people to
  change this default behaviour?  Its important to me that when people
  are at our site's home page, its just http://oursite.com;, not
  http://oursite.com/index;.

  Then for people who are using a container where this is a problem, it
  will work fine, but others can avoid the index in the url.

  - Alex

  On Dec 30, 12:49 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   On Wed, Dec 30, 2009 at 9:43 AM, Alex Black a...@alexblack.ca wrote:
 In a 1.1-M8 based project,
   http://localhost:8080/andhttp://localhost:8080/indexbothcausethe
  Home
menu item to be
 non-clickable.  The definition of the Home menu item is
  Menu(Loc(Home,
 List(index), Home))

Understood.

However, in this scenario, when the user clicks on home they get
taken tohttp://localhost:8080/index, I think it would be even better
if they could be taken tohttp://localhost:8080/.  Its mostly
aesthetic, but its cleaner/shorter, and it saves having two URLs for
the same thing (e.g.http://localhost:8080/and
   http://localhost:8080/index).

Is there any way to do that while maintaining the nice Sitemap feature
that makes Home non clickable?

   As I said already, we had thehttp://localhost:8080/asthe place where the
   top level takes you.  That broke some containers (I don't remember the
   specifics) so the top level is /index.  There's no way to change it and
  it
   is this way for the reason that I've now had to state twice in two days.

- Alex

   Also, why do you using Pair(List(...), false)?

   Pair is deprecated/frowned on... it's much more idomatic to use
  (List(...),
   false), but that's not needed as there's an implicit conversion
  you
can
   simply declare the List().

  Thanks for the tip.

to

   Menu(Loc(index, Pair( :: Nil, false), Home)) ::

So that my Home link goes to mysite.com/ instead of
  mysite.com/
index.  But, I notice, when you're at mysite.com/ the sitemap
doesn't
show Home as selected, is there a way to fix that? Perhaps
  I've
got
something wrong here.

Thanks,

- Alex

--

You received this message because you are subscribed to the
  Google
  Groups
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to
liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com

liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
  liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com

  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
  liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com

liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com
  liftweb%25252bunsubscr...@googlegroups.comliftweb%2525252bunsubscr...@googlegroups.com

.
For more options, visit this group at
   http://groups.google.com/group/liftweb?hl=en.

   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Surf the harmonics

  --

  You received this message because you are subscribed to the Google
Groups
  Lift group.
  To post to this group, send email to lift...@googlegroups.com.
  To unsubscribe from this group, send email to
  liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com

liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
  liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com

  .
  For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics

--

You received this message because you are subscribed to the Google
  Groups
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to
liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  

Re: [Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-30 Thread David Pollak
On Tue, Dec 29, 2009 at 9:19 PM, Alex Black a...@alexblack.ca wrote:

   I've changed my sitemap from:
 
  Menu(Loc(index, Pair(index :: Nil, false), Home)) ::
 
  Yes, the / directory will be rendered by Lift as /index  There's no way
  around that one.

 Can you explain? I don't understand.  I'm not sure what rendered
 means in this context, and I'm not as far as I know seeing anything
 rendered as /index.  What I am seeing is when I click on the home
 link, I correctly arrive at mysite.com/ but the home link is not
 visually selected.  Whereas, when I click on other links, like about
 they then appear selected.


In a 1.1-M8 based project, http://localhost:8080/ and
http://localhost:8080/index both cause the Home menu item to be
non-clickable.  The definition of the Home menu item is Menu(Loc(Home,
List(index), Home))



  Also, why do you using Pair(List(...), false)?
 
  Pair is deprecated/frowned on... it's much more idomatic to use
 (List(...),
  false), but that's not needed as there's an implicit conversion you can
  simply declare the List().

 Thanks for the tip.

 
 
 
 
 
   to
 
  Menu(Loc(index, Pair( :: Nil, false), Home)) ::
 
   So that my Home link goes to mysite.com/ instead of mysite.com/
   index.  But, I notice, when you're at mysite.com/ the sitemap doesn't
   show Home as selected, is there a way to fix that? Perhaps I've got
   something wrong here.
 
   Thanks,
 
   - Alex
 
   --
 
   You received this message because you are subscribed to the Google
 Groups
   Lift group.
   To post to this group, send email to lift...@googlegroups.com.
   To unsubscribe from this group, send email to
   liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/liftweb?hl=en.
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Surf the harmonics

 --

 You received this message because you are subscribed to the Google Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.





-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-30 Thread Alex Black
 In a 1.1-M8 based 
 project,http://localhost:8080/andhttp://localhost:8080/indexboth cause the 
 Home menu item to be
 non-clickable.  The definition of the Home menu item is Menu(Loc(Home,
 List(index), Home))

Understood.

However, in this scenario, when the user clicks on home they get
taken to http://localhost:8080/index, I think it would be even better
if they could be taken to http://localhost:8080/.  Its mostly
aesthetic, but its cleaner/shorter, and it saves having two URLs for
the same thing (e.g. http://localhost:8080/ and http://localhost:8080/index).

Is there any way to do that while maintaining the nice Sitemap feature
that makes Home non clickable?

- Alex






   Also, why do you using Pair(List(...), false)?

   Pair is deprecated/frowned on... it's much more idomatic to use
  (List(...),
   false), but that's not needed as there's an implicit conversion you can
   simply declare the List().

  Thanks for the tip.

to

   Menu(Loc(index, Pair( :: Nil, false), Home)) ::

So that my Home link goes to mysite.com/ instead of mysite.com/
index.  But, I notice, when you're at mysite.com/ the sitemap doesn't
show Home as selected, is there a way to fix that? Perhaps I've got
something wrong here.

Thanks,

- Alex

--

You received this message because you are subscribed to the Google
  Groups
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to
liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com

.
For more options, visit this group at
   http://groups.google.com/group/liftweb?hl=en.

   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Surf the harmonics

  --

  You received this message because you are subscribed to the Google Groups
  Lift group.
  To post to this group, send email to lift...@googlegroups.com.
  To unsubscribe from this group, send email to
  liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




Re: [Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-30 Thread David Pollak
On Wed, Dec 30, 2009 at 9:43 AM, Alex Black a...@alexblack.ca wrote:

  In a 1.1-M8 based project,
 http://localhost:8080/andhttp://localhost:8080/indexboth cause the Home
 menu item to be
  non-clickable.  The definition of the Home menu item is Menu(Loc(Home,
  List(index), Home))

 Understood.

 However, in this scenario, when the user clicks on home they get
 taken to http://localhost:8080/index, I think it would be even better
 if they could be taken to http://localhost:8080/.  Its mostly
 aesthetic, but its cleaner/shorter, and it saves having two URLs for
 the same thing (e.g. http://localhost:8080/ and
 http://localhost:8080/index).

 Is there any way to do that while maintaining the nice Sitemap feature
 that makes Home non clickable?


As I said already, we had the http://localhost:8080/ as the place where the
top level takes you.  That broke some containers (I don't remember the
specifics) so the top level is /index.  There's no way to change it and it
is this way for the reason that I've now had to state twice in two days.



 - Alex

 
 
 
 
 
Also, why do you using Pair(List(...), false)?
 
Pair is deprecated/frowned on... it's much more idomatic to use
   (List(...),
false), but that's not needed as there's an implicit conversion you
 can
simply declare the List().
 
   Thanks for the tip.
 
 to
 
Menu(Loc(index, Pair( :: Nil, false), Home)) ::
 
 So that my Home link goes to mysite.com/ instead of mysite.com/
 index.  But, I notice, when you're at mysite.com/ the sitemap
 doesn't
 show Home as selected, is there a way to fix that? Perhaps I've
 got
 something wrong here.
 
 Thanks,
 
 - Alex
 
 --
 
 You received this message because you are subscribed to the Google
   Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 
   liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com
 
 
 .
 For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en.
 
--
Lift, the simply functional web frameworkhttp://liftweb.net
Beginning Scalahttp://www.apress.com/book/view/1430219890
Follow me:http://twitter.com/dpp
Surf the harmonics
 
   --
 
   You received this message because you are subscribed to the Google
 Groups
   Lift group.
   To post to this group, send email to lift...@googlegroups.com.
   To unsubscribe from this group, send email to
   liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/liftweb?hl=en.
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Surf the harmonics

 --

 You received this message because you are subscribed to the Google Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.





-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-30 Thread Alex Black
David, I'm not trying to anger you, and although you do constantly
reply with helpful information (which I appreciate) the tone of your
messages makes me think you think I am an idiot.

I'd appreciate it if you'd bear with me, I'm only human.

Thanks for explaining.  I don't yet fully understand, perhaps because
I am missing some perspective or experience with Lift.  But,
regardless, in my website, the top level is not /index, its /, and
I've achieved that by defining home slightly differently than you
did.  It works well for me, except Home remains clickable, I guess I
will live with that issue.

thx

- Alex

On Dec 30, 12:49 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Wed, Dec 30, 2009 at 9:43 AM, Alex Black a...@alexblack.ca wrote:
   In a 1.1-M8 based project,
 http://localhost:8080/andhttp://localhost:8080/indexbothcause the Home
  menu item to be
   non-clickable.  The definition of the Home menu item is Menu(Loc(Home,
   List(index), Home))

  Understood.

  However, in this scenario, when the user clicks on home they get
  taken tohttp://localhost:8080/index, I think it would be even better
  if they could be taken tohttp://localhost:8080/.  Its mostly
  aesthetic, but its cleaner/shorter, and it saves having two URLs for
  the same thing (e.g.http://localhost:8080/and
 http://localhost:8080/index).

  Is there any way to do that while maintaining the nice Sitemap feature
  that makes Home non clickable?

 As I said already, we had thehttp://localhost:8080/as the place where the
 top level takes you.  That broke some containers (I don't remember the
 specifics) so the top level is /index.  There's no way to change it and it
 is this way for the reason that I've now had to state twice in two days.





  - Alex

 Also, why do you using Pair(List(...), false)?

 Pair is deprecated/frowned on... it's much more idomatic to use
(List(...),
 false), but that's not needed as there's an implicit conversion you
  can
 simply declare the List().

Thanks for the tip.

  to

     Menu(Loc(index, Pair( :: Nil, false), Home)) ::

  So that my Home link goes to mysite.com/ instead of mysite.com/
  index.  But, I notice, when you're at mysite.com/ the sitemap
  doesn't
  show Home as selected, is there a way to fix that? Perhaps I've
  got
  something wrong here.

  Thanks,

  - Alex

  --

  You received this message because you are subscribed to the Google
Groups
  Lift group.
  To post to this group, send email to lift...@googlegroups.com.
  To unsubscribe from this group, send email to
  liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com

liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
  liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com

  .
  For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics

--

You received this message because you are subscribed to the Google
  Groups
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to
liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com

.
For more options, visit this group at
   http://groups.google.com/group/liftweb?hl=en.

   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Surf the harmonics

  --

  You received this message because you are subscribed to the Google Groups
  Lift group.
  To post to this group, send email to lift...@googlegroups.com.
  To unsubscribe from this group, send email to
  liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-30 Thread Alex Black
Would it be reasonable for me to open a ticket to allow people to
change this default behaviour?  Its important to me that when people
are at our site's home page, its just http://oursite.com;, not
http://oursite.com/index;.

Then for people who are using a container where this is a problem, it
will work fine, but others can avoid the index in the url.

- Alex

On Dec 30, 12:49 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Wed, Dec 30, 2009 at 9:43 AM, Alex Black a...@alexblack.ca wrote:
   In a 1.1-M8 based project,
 http://localhost:8080/andhttp://localhost:8080/indexbothcause the Home
  menu item to be
   non-clickable.  The definition of the Home menu item is Menu(Loc(Home,
   List(index), Home))

  Understood.

  However, in this scenario, when the user clicks on home they get
  taken tohttp://localhost:8080/index, I think it would be even better
  if they could be taken tohttp://localhost:8080/.  Its mostly
  aesthetic, but its cleaner/shorter, and it saves having two URLs for
  the same thing (e.g.http://localhost:8080/and
 http://localhost:8080/index).

  Is there any way to do that while maintaining the nice Sitemap feature
  that makes Home non clickable?

 As I said already, we had thehttp://localhost:8080/as the place where the
 top level takes you.  That broke some containers (I don't remember the
 specifics) so the top level is /index.  There's no way to change it and it
 is this way for the reason that I've now had to state twice in two days.





  - Alex

 Also, why do you using Pair(List(...), false)?

 Pair is deprecated/frowned on... it's much more idomatic to use
(List(...),
 false), but that's not needed as there's an implicit conversion you
  can
 simply declare the List().

Thanks for the tip.

  to

     Menu(Loc(index, Pair( :: Nil, false), Home)) ::

  So that my Home link goes to mysite.com/ instead of mysite.com/
  index.  But, I notice, when you're at mysite.com/ the sitemap
  doesn't
  show Home as selected, is there a way to fix that? Perhaps I've
  got
  something wrong here.

  Thanks,

  - Alex

  --

  You received this message because you are subscribed to the Google
Groups
  Lift group.
  To post to this group, send email to lift...@googlegroups.com.
  To unsubscribe from this group, send email to
  liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com

liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
  liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com

  .
  For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics

--

You received this message because you are subscribed to the Google
  Groups
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to
liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com

.
For more options, visit this group at
   http://groups.google.com/group/liftweb?hl=en.

   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Surf the harmonics

  --

  You received this message because you are subscribed to the Google Groups
  Lift group.
  To post to this group, send email to lift...@googlegroups.com.
  To unsubscribe from this group, send email to
  liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-29 Thread Alex Black
  I've changed my sitemap from:

     Menu(Loc(index, Pair(index :: Nil, false), Home)) ::

 Yes, the / directory will be rendered by Lift as /index  There's no way
 around that one.

Can you explain? I don't understand.  I'm not sure what rendered
means in this context, and I'm not as far as I know seeing anything
rendered as /index.  What I am seeing is when I click on the home
link, I correctly arrive at mysite.com/ but the home link is not
visually selected.  Whereas, when I click on other links, like about
they then appear selected.

 Also, why do you using Pair(List(...), false)?

 Pair is deprecated/frowned on... it's much more idomatic to use (List(...),
 false), but that's not needed as there's an implicit conversion you can
 simply declare the List().

Thanks for the tip.






  to

     Menu(Loc(index, Pair( :: Nil, false), Home)) ::

  So that my Home link goes to mysite.com/ instead of mysite.com/
  index.  But, I notice, when you're at mysite.com/ the sitemap doesn't
  show Home as selected, is there a way to fix that? Perhaps I've got
  something wrong here.

  Thanks,

  - Alex

  --

  You received this message because you are subscribed to the Google Groups
  Lift group.
  To post to this group, send email to lift...@googlegroups.com.
  To unsubscribe from this group, send email to
  liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.