留言板

How to have the classic nav bar?

Qu Ga,修改在9 年前。

How to have the classic nav bar?

Junior Member 帖子: 36 加入日期: 15-2-19 最近的帖子
Hi,

I have a little problem, I'm doing a theme which has "Classic" as parent but the nav bar isn't like the classic bar. Let me show you.

What I want



And what I have



If you have an idea...

Thanks !
thumbnail
Juan Gonzalez,修改在9 年前。

RE: How to have the classic nav bar?

Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
Hi Qu,

what does your portal_normal.vm contain? You should have "dockbar-split" as one of your css classes applied to <body>:

https://github.com/liferay/liferay-portal/blob/6.2.2-ga3/portal-web/docroot/html/themes/classic/_diffs/templates/init_custom.vm#L1
Qu Ga,修改在9 年前。

RE: How to have the classic nav bar?

Junior Member 帖子: 36 加入日期: 15-2-19 最近的帖子
Hi Juan,

Yes I have dockbar-split in my CSS class.

Here is my portal_normal.ftl :



&lt;#include init /&gt;

" lang="${w3c_language_id}"&gt;


	<title>${the_title} - ${company_name}</title>

	<meta content="initial-scale=1.0, width=device-width" name="viewport">

	${theme.include(top_head_include)}




<a href="#main-content" id="skip-to-content">&lt;@liferay.language key="skip-to-content" /&gt;</a>

${theme.include(body_top_include)}

&lt;#if is_signed_in&gt;
	&lt;@liferay.dockbar /&gt;
<!--#if-->

<div class="container-fluid" id="wrapper">
	<header id="banner" role="banner">
		<div id="heading">
			<h1 class="site-title">
				<a class="${logo_css_class}" href="${site_default_url}" title="<@liferay.language_format arguments=" ${site_name}" key="go-to-x"></a>"&gt;
					<img alt="${logo_description}" height="${site_logo_height}" src="${site_logo}" width="${site_logo_width}">
				

				&lt;#if show_site_name&gt;
					<span class="site-name" title="<@liferay.language_format objects=" ${site_name}" key="go-to-x"></span>"&gt;
						${site_name}
					
				<!--#if-->
			</h1>

			<h2 class="page-title">
				<span>${the_title}</span>
			</h2>
		</div>

		&lt;#if !is_signed_in&gt;
			<a href="${sign_in_url}" data-redirect="${is_login_redirect_required?string}" id="sign-in" rel="nofollow">${sign_in_text}</a>
		<!--#if-->

		&lt;#if has_navigation || is_signed_in&gt;
			&lt;#include "${full_templates_path}/navigation.ftl" /&gt;
		<!--#if-->
	</header>

	<div id="content">
		<nav id="breadcrumbs">&lt;@liferay.breadcrumbs /&gt;</nav>

		&lt;#if selectable&gt;
			${theme.include(content_include)}
		&lt;#else&gt;
			${portletDisplay.recycle()}

			${portletDisplay.setTitle(the_title)}

			${theme.wrapPortlet("portlet.ftl", content_include)}
		<!--#if-->
	</div>

	<footer id="footer" role="contentinfo">
		<p class="powered-by">
			&lt;@liferay.language key="powered-by" /&gt; <a href="http://www.liferay.com" rel="external">Liferay</a>
		</p>
	</footer>
</div>

${theme.include(body_bottom_include)}

${theme.include(bottom_include)}





I don't have a portal_normal.vm but it is probably cause I use eclipse no?

Thanks !
thumbnail
Juan Gonzalez,修改在9 年前。

RE: How to have the classic nav bar?

Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
depending if you are using Freemarker (default) or Velocity you will use one file extension or another.

Which files do you have in _diffs/ directory within your theme hierarchy ?
Qu Ga,修改在9 年前。

RE: How to have the classic nav bar?

Junior Member 帖子: 36 加入日期: 15-2-19 最近的帖子
I let it by default so Freemaker.

I only have a custom.css in my _diffs directory.

EDIT : I added
#set ($css_class = "${css_class} dockbar-split")
and it works for the menu but how can I get this?



I only have the links without style !

Thanks !
thumbnail
Nick Burton,修改在8 年前。

RE: How to have the classic nav bar?

Junior Member 帖子: 51 加入日期: 14-7-13 最近的帖子
I had the same problem.
It was suggested that Freemarker does not copy all the files.
I was told to change to Velocity and that sorted the problem.

Now I want to use Freemarker I cannot find out what files or code is missing.

Anyone know?

Thanks in advance.