2
votes

I am a newbie to liferay CMS. I am developing a theme in liferay 6.1.1. my problem is when i am making any changes to the theme it doesnt get reflected after deploying it. Please check if i am in the right flow:

  1. Firstly new --> liferay project --> selected theme
  2. Deployed nthe theme which created the -diffs folder and the remaining all folders in the docroot folder inside the theme.
  3. Copied the portlet_normal.vm from the template folder from my theme and made changes.
  4. Pasted portlet_normal.vm in my theme inside the docroot(folder) --> _diffs(folder) --> templates(folder).
  5. Redeployed the theme but there were no changes reflected.

My portlet_normal.vm file is:

<!DOCTYPE html>

#parse ($init)

<html class="#language("lang.dir")" dir="#language("lang.dir")" lang="$w3c_language_id">

<head>
    <title>$the_title - $company_name</title>

    $theme.include($top_head_include)
</head>

<body class="$css_class">

$theme.include($body_top_include)

#if ($is_signed_in)
    #dockbar()
#end

<div id="wrapper">
    <a href="#main-content" id="skip-to-content">#language("skip-to-content")</a>

    <header id="banner" role="banner">
        <div id="heading">
            <h1 class="site-title">
                <a class="$logo_css_class" href="$site_default_url" title="#language("go-to") $site_name">
                    <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="#language("go-to") $site_name">
                        $site_name
                    </span>
                #end
            </h1>

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

        #if (!$is_signed_in)
            <a href="$sign_in_url" id="sign-in" rel="nofollow">$sign_in_text</a>
        #end

        #if ($has_navigation || $is_signed_in)
            #parse ("$full_templates_path/navigation.vm")
        #end
    </header>

    <div id="content">
        **/*<nav class="site-breadcrumbs" id="breadcrumbs">
            <h1>
                <span>#language("breadcrumbs")</span>
            </h1>
            #breadcrumbs()
        </nav>*/**


        #if ($selectable)
            $theme.include($content_include)
        #else
            $portletDisplay.recycle()

            $portletDisplay.setTitle($the_title)

            $theme.wrapPortlet("portlet.vm", $content_include)
        #end
    </div>

    <footer id="footer" role="contentinfo">
        <p class="powered-by">
            #language("powered-by") <a href="http://www.liferay.com" rel="external">Liferay</a>
        </p>
    </footer>
</div>

$theme.include($body_bottom_include)

</body>

$theme.include($bottom_include)

</html>

Actually i want to hide the breadcrumbs getting displayed in the home page. so i have commented that particular portion in portlet_normal.vm Any help regarding this will be appreciated , i am completely stuck in this.

2

2 Answers

2
votes

You have two possibilities:
If you are developping, you can set the portal in dev mode adding
include-and-override=portal-developer.properties
into your portal-ext.properties which should be under the portal root.
If you are in production this option should be disabled and you should check the following

Try to open the XML file build-common-theme.xml under the themes folder in your SDK and remove all the preservelastmodified="true" (or set them to false).

preservelastmodified, when true will not update the files timestamp in your theme project. Therefore, your application server will not detect the changes and redeploy the theme.

0
votes

From step 1 it seems that you are using Eclipse to create Liferay theme project. Whenevr you create the project you will get

enter image description here

Now all you need to do is, change the files within the _diffs directory and build the theme with ant file build.xml, rest will be taken care by the build file. I am not sure why steps 3 and 4 required.

If the problem still exists, couple of points to look at are :

velocity.engine.resource.manager.cache.enabled=false

set this property in your portal-ext.properties and restart the server.