掲示板

Explanation of theme in liferay 6.2

7年前 に mohit mehral によって更新されました。

Explanation of theme in liferay 6.2

New Member 投稿: 8 参加年月日: 16/11/24 最新の投稿
Hi everyone,

i am new to liferay and i am trying to understand theme in liferay...
i am all set with installation and able to create new theme and deploy.

I want to know the how the flow is going on in classic theme

for an example : this is the code for portal_normal.ftl

<!DOCTYPE html>
<#include init />
<html class="${root_css_class}" dir="<@liferay.language key="lang.dir" />" lang="${w3c_language_id}">
<head>
<title>${the_title} - ${company_name}</title>
<meta content="initial-scale=1.0, width=device-width" name="viewport" />
${theme.include(top_head_include)}
</head>
<body class="${css_class}">
<a href="#main-content" id="skip-to-content"><@liferay.language key="skip-to-content" /></a>
${theme.include(body_top_include)}
<#if is_signed_in>
<@liferay.dockbar />
</#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" />">
<img alt="${logo_description}" height="${site_logo_height}" src="${site_logo}" width="${site_logo_width}" />
</a>

<#if show_site_name>
<span class="site-name" title="<@liferay.language_format arguments="${site_name}" key="go-to-x" />">
${site_name}
</span>
</#if>
</h1>
<h2 class="page-title">
<span>${the_title}</span>
</h2>
</div>
<#if !is_signed_in>
<a href="${sign_in_url}" data-redirect="${is_login_redirect_required?string}" id="sign-in" rel="nofollow">${sign_in_text}</a>
</#if>
<#if has_navigation || is_signed_in>
<#include "${full_templates_path}/navigation.ftl" />
</#if>
</header>
<div id="content">
<nav id="breadcrumbs"><@liferay.breadcrumbs /></nav>
<#if selectable>
${theme.include(content_include)}
<#else>
${portletDisplay.recycle()}
${portletDisplay.setTitle(the_title)}
${theme.wrapPortlet("portlet.ftl", content_include)}
</#if>
</div>
<footer id="footer" role="contentinfo">
<p class="powered-by">
<@liferay.language key="powered-by" /> <a href="http://www.liferay.com" rel="external">Liferay</a>
</p>
</footer>
</div>
${theme.include(body_bottom_include)}
${theme.include(bottom_include)}
</body>
</html>


variabls used in above code like root_css_class,the_title,logo_css_class etc where this all are coming from..

what if want completely change the theme and use my own design then what should i do??
i am not finding any resource where i can develop theme from scratch and learn the entire flow of theme.


Please help...
thumbnail
7年前 に David H Nebinger によって更新されました。

RE: Explanation of theme in liferay 6.2

Liferay Legend 投稿: 14918 参加年月日: 06/09/02 最新の投稿
These are set from the init.ftl template that, if you have not overriden, come from the unstyled theme.

You are free to change the templates however you want, but you should be aware that Liferay has some common structure expectations that will be necessary to render correctly.

For example, you can create a theme that does not use the content_include stuff, but you'll therefore not get any portal content.

The themes are not meant to be rigid, but they are guides for what you will need to get all portal assets to render correctly.
7年前 に mohit mehral によって更新されました。

RE: Explanation of theme in liferay 6.2

New Member 投稿: 8 参加年月日: 16/11/24 最新の投稿
Hi David,

Thanks david for replying.

As you said that liferay has a common structure, i want to learn about that and i am not getting any material to study that

Right now i am concentrating on UI Part, Liferay with classic theme has a navigation and its code is written in navigation.ftl and is dynamic too..
What if i want to change the entire naviigation design of that, but should be dynamic...???

regards,
Mohit.
thumbnail
7年前 に David H Nebinger によって更新されました。

RE: Explanation of theme in liferay 6.2

Liferay Legend 投稿: 14918 参加年月日: 06/09/02 最新の投稿
I tell everyone the best source of how to do something is the Liferay source itself.

If classic has the features you want to learn, then study it. Create a theme that extends classic in order to play around with it. That's going to prove more worthwhile than some stale documentation that somebody created for an older version of Liferay.