Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ben Brown
Bootstrap Theme Problems
July 18, 2013 1:23 AM
Answer

Ben Brown

Rank: Junior Member

Posts: 79

Join Date: July 7, 2010

Recent Posts

Hi,

I'm developing a theme using the Bootstrap framework and pretty much everything works apart from a couple of oddities.

When editing web content in a page the content doesn't appear, and the links to the side don't work:



Also the portlet editing controls don't work.



Any ideas where to start looking?

Thanks for any help,

Ben
Ben Brown
RE: Bootstrap Theme Problems
July 18, 2013 2:00 AM
Answer

Ben Brown

Rank: Junior Member

Posts: 79

Join Date: July 7, 2010

Recent Posts

Attached is the portal_normal template I'm using.

Thanks again.

Ben
Attachments: portal_normal.txt (9.0k)
Olaf Kock
RE: Bootstrap Theme Problems
July 18, 2013 2:08 AM
Answer

Olaf Kock

LIFERAY STAFF

Rank: Liferay Legend

Posts: 3431

Join Date: September 23, 2008

Recent Posts

I haven't tried to bring bootstrap into the current releases (so I have no experience with it), but I'd look first at the DOM: Are the elements that you're looking for available? How are they decorated in terms of css-classes (in the hierarchy). Any "display:none" in there? absolute positions or z-indexes? As these elements are typically not seen and bootstrap uses a different set of css-classes than Liferay's standard themes do, this would be my first attempt. Maybe it's as simple as identifying the appropriate css-stuff that you're missing - either from css or from your portal-normal DOM code.

By the way: What parent theme are you building on?

Fun fact (that unfortunately doesn't help you now): Liferay 6.2 will be built on bootstrap, so sooner or later your problem will certainly go away.
Ben Brown
RE: Bootstrap Theme Problems
July 18, 2013 2:16 AM
Answer

Ben Brown

Rank: Junior Member

Posts: 79

Join Date: July 7, 2010

Recent Posts

Thanks for that - building it on the blank theme that the SDK creates in Eclipse.

Oh and this is on 6.1 EE.
Ben Brown
RE: Bootstrap Theme Problems
July 18, 2013 2:41 AM
Answer

Ben Brown

Rank: Junior Member

Posts: 79

Join Date: July 7, 2010

Recent Posts

Looks like it's a JS thing.

If I disable JS on the default Liferay theme I get the same errors as on my theme...

I'll keep looking....
Olaf Kock
RE: Bootstrap Theme Problems
July 18, 2013 3:29 AM
Answer

Olaf Kock

LIFERAY STAFF

Rank: Liferay Legend

Posts: 3431

Join Date: September 23, 2008

Recent Posts

My 0.02€: <body class=".... controls-hidden"> is triggered by the "Edit Controls" checkbox in the dockbar. Especially the controls in the portlet title are typically hidden with this class while still being in the DOM (at least with appropriate permissions)
Ben Brown
RE: Bootstrap Theme Problems
July 18, 2013 4:15 AM
Answer

Ben Brown

Rank: Junior Member

Posts: 79

Join Date: July 7, 2010

Recent Posts

Hmmmmm the controls are showing, but do nothing when I click on them (e.g if I try clicking on the spanner, nothing happens).
Ben Brown
RE: Bootstrap Theme Problems
July 22, 2013 6:20 AM
Answer

Ben Brown

Rank: Junior Member

Posts: 79

Join Date: July 7, 2010

Recent Posts

Well. I rechecked all my code again today and there was just one line missing - $theme.include($bottom_include) - which I added and it's sorted everything out!

Sorry about that - please go about your business.

emoticon

Ben
M J
RE: Bootstrap Theme Problems
July 29, 2013 7:24 AM
Answer

M J

Rank: Regular Member

Posts: 184

Join Date: March 1, 2013

Recent Posts

Hi Ben,

I am trying to implement custom responsive bootstrap theme in Liferay 6.1. Do you have any samples or instructions how to go about? Appreciate your help.

Thanks,
MJ
Ben Brown
RE: Bootstrap Theme Problems
July 30, 2013 5:24 AM
Answer

Ben Brown

Rank: Junior Member

Posts: 79

Join Date: July 7, 2010

Recent Posts

There are 3 .war files you can have a look at to get you started on my site: www.benbrown.org.

1) In Eclipse, I created an empty theme
2) I created the template folder under the _diffs folder
3) took a copy of the portal_normal.vm and started to add the Bootstrap bits - tested and repeated emoticon

Shout if you need any more info,

Ben
Ben Brown
RE: Bootstrap Theme Problems
July 30, 2013 5:25 AM
Answer

Ben Brown

Rank: Junior Member

Posts: 79

Join Date: July 7, 2010

Recent Posts

Oh - and just check that they still work, they CSS/JS etc point directly to Bootstrap which has just changed to v3.

Hope that helps.

Ben
M J
RE: Bootstrap Theme Problems
July 30, 2013 5:58 AM
Answer

M J

Rank: Regular Member

Posts: 184

Join Date: March 1, 2013

Recent Posts

Thanks Ben for your help. I will go through the war files you mentioned above. I really appreciate the help.

MJ