content_id on the body

118 views
Skip to first unread message

Guillaume Massé

unread,
Oct 25, 2012, 2:51:09 AM10/25/12
to lif...@googlegroups.com
Hey

I was writing some documentation about designer friendly: http://doc.scalakata.com/view#designer-friendly

Is it possible to set the body as the content_id ?

The closest I got was the following:
<body id="real-content" data-lift-content-id="real-content" data-lift="surround?with=default;at=bind-content">

but this duplicates the content :-(

Guillaume Massé

unread,
Oct 28, 2012, 3:41:26 AM10/28/12
to lif...@googlegroups.com
@dpp should I fill a bug / build a demo projet with the bug ?

David Pollak

unread,
Oct 29, 2012, 3:30:28 PM10/29/12
to lif...@googlegroups.com
Please put together an example.

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
 
 



--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net


Guillaume Massé

unread,
Oct 29, 2012, 11:56:49 PM10/29/12
to lif...@googlegroups.com
There you go:

git clone git://github.com/MasseGuillaume/LiftRealContentBug.git

localhost:8080/

David Pollak

unread,
Oct 30, 2012, 2:14:04 PM10/30/12
to lif...@googlegroups.com
How do I launch it? Please assume that I don't have sbt installed on my machine (I have about 20 versions of sbt on the machine and 20 is as good as none.)

Naftoli Gugenheim

unread,
Oct 30, 2012, 10:23:03 PM10/30/12
to lif...@googlegroups.com
He's using sbt 0.12, as you can see from https://github.com/MasseGuillaume/LiftRealContentBug/blob/master/project/plugins.sbt (the only part for which the sbt version matters).

Guillaume Massé

unread,
Oct 30, 2012, 11:23:02 PM10/30/12
to lif...@googlegroups.com
Good point, it's sbt 0.12. I added the launcher inside the project.

David Pollak

unread,
Nov 1, 2012, 12:53:11 PM11/1/12
to lif...@googlegroups.com
This is a bug in your template:

Your template looks like:

<!doctype html>
<html>
<head>
<title>surround</title>
</head>

<body>
<em>before content</em>
    <div id="bind-content"></div>
    <em>after content</em>
</body>
</html>

So, the <body> tag in page b is going to be inserted at the <div> and voila... duplicate body tags.

If you put the id="bind-content" attribute on the <body> tag in your template, you'll get a single body tag.

Guillaume Massé

unread,
Nov 1, 2012, 7:12:47 PM11/1/12
to lif...@googlegroups.com
Oh right !

Thanks :D

Guillaume

Guillaume Massé

unread,
Nov 3, 2012, 1:22:26 AM11/3/12
to lif...@googlegroups.com
Hi David,

If I put id="bind-content" on the <body> tag the surround is not parsed properly

body will remain with attributes: id="real-content" data-lift-content-id="real-content"

I updated the example here:

Guillaume Massé

unread,
Nov 3, 2012, 9:40:32 PM11/3/12
to lif...@googlegroups.com
regarding mutliple sbt versions

you should try Paul Philip's sbt-extra. It autodetect sbt version :-)
Reply all
Reply to author
Forward
0 new messages