Details

    • Type: Feature Request Feature Request
    • Status: Contributed Solution
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 6.0.6 GA
    • Fix Version/s: None
    • Labels:
    • Liferay Contributor's Agreement:
      Accept
    • Similar Issues:
      Show 5 results 

      Description

      Contrary to Themes, Layouttemplates don't allow to specify portletpreferences for embedded portlets. The only available interface is $processor.processPortlet("portletid");

      This should be fixed - especially as it otherwise doesn't make much sense to embed instanceable portlets..

        Activity

        Hide
        Juan Fernández added a comment -

        Hi Olaf:
        Moved to product backlog: this feature may be added in the next major version. It'll be analyzed by the engineering team.
        We will appreciate if you or any community member contribute this functionality
        Thanks for your feedback!

        Show
        Juan Fernández added a comment - Hi Olaf: Moved to product backlog: this feature may be added in the next major version. It'll be analyzed by the engineering team. We will appreciate if you or any community member contribute this functionality Thanks for your feedback!
        Hide
        Olaf Kock added a comment -

        Changing severity to "minor" as there's a workaround that might even be the final solution - but then it should be documented as such:

        Embedding a portlet and setting the preferences seems to work in LayoutTemplates when using $theme and $velocityPortletPreferences, just like in themes:

        $velocityPortletPreferences.setValue("portlet-setup-show-borders", "false")
        $velocityPortletPreferences.setValue("header-type", "none")
        $velocityPortletPreferences.setValue("root-layout-type", "absolute")
        $velocityPortletPreferences.setValue("root-layout-level", "2")
        $velocityPortletPreferences.setValue("included-layouts", "buderusleft")
        $velocityPortletPreferences.setValue("nested-children", "true")
        $theme.runtime("71_INSTANCE_abcd", "", $velocityPortletPreferences.toString())
        $velocityPortletPreferences.reset()

        Show
        Olaf Kock added a comment - Changing severity to "minor" as there's a workaround that might even be the final solution - but then it should be documented as such: Embedding a portlet and setting the preferences seems to work in LayoutTemplates when using $theme and $velocityPortletPreferences, just like in themes: $velocityPortletPreferences.setValue("portlet-setup-show-borders", "false") $velocityPortletPreferences.setValue("header-type", "none") $velocityPortletPreferences.setValue("root-layout-type", "absolute") $velocityPortletPreferences.setValue("root-layout-level", "2") $velocityPortletPreferences.setValue("included-layouts", "buderusleft") $velocityPortletPreferences.setValue("nested-children", "true") $theme.runtime("71_INSTANCE_abcd", "", $velocityPortletPreferences.toString()) $velocityPortletPreferences.reset()
        Hide
        Vilius Simonaitis added a comment -

        This is not a complete workaround as portlets added through $theme.runtime() interface are not staged. The $processor.processPortlet() interface should accept $velocityPortletPreferences to set default portlet properties.

        Is there any update regarding this issue?

        Show
        Vilius Simonaitis added a comment - This is not a complete workaround as portlets added through $theme.runtime() interface are not staged. The $processor.processPortlet() interface should accept $velocityPortletPreferences to set default portlet properties. Is there any update regarding this issue?
        Hide
        Olaf Kock added a comment -

        @Vilius Simonaitis: What do you mean with "...are not staged": They're included by the layouttemplate. If the layouttemplate plugin on production as well as on staging differ, they naturally won't match. I'd expect only the portlets manually added to a page to be included in the staging/publishing process.
        Or am I mixing things up and don't see the obvious?

        Show
        Olaf Kock added a comment - @Vilius Simonaitis: What do you mean with "...are not staged": They're included by the layouttemplate. If the layouttemplate plugin on production as well as on staging differ, they naturally won't match. I'd expect only the portlets manually added to a page to be included in the staging/publishing process. Or am I mixing things up and don't see the obvious?
        Hide
        Randy Zhu added a comment -

        In preparation for Ideation; we are merging New Feature and Improvement tickets into a singular ticket type called “Feature Request”. Additional information to follow soon.

        Show
        Randy Zhu added a comment - In preparation for Ideation; we are merging New Feature and Improvement tickets into a singular ticket type called “Feature Request”. Additional information to follow soon.
        Hide
        Adam Nagy added a comment -

        In case of non instanceable portlets there is an easy workaround: The embedded portlets use the preferences of the same portlets which are on simple pages.

        Here are the steps to walk around the problem:

        1. Create a remote staging environment.
        2. Deploy a non instanceable portlet. (both staging and live)
        3. Create a page template and add the portlet to this template.
        4. Create a page based on this template on staging side.
        5. Publish to live. In this case the template has to be explicitly imported on live site in order to run a successful publish.
        6. After the initial publish, modify the test portlet's preference on its configuration screen.
        7. No changes are exported to live.

        8. Upon testing I realized that not the latest change is picked up, so I had to remove the portlet from the template, then publish once to clear the live site's setup.

        9. Create another page and add the portlet there and configure it.
        10. Publish to live, including this newly created page too.
        11. Add the portlet back to the page template without configuring it.
        12. Verify on staging side that the preferences are not picked up from the portlet which is already on another page. Reconfigure it.
        13. Publish everything to live
        14. Later on to modify the portlet preferences on live it is enough to publish only the page where the portlet got configured.

        Show
        Adam Nagy added a comment - In case of non instanceable portlets there is an easy workaround: The embedded portlets use the preferences of the same portlets which are on simple pages. Here are the steps to walk around the problem: 1. Create a remote staging environment. 2. Deploy a non instanceable portlet. (both staging and live) 3. Create a page template and add the portlet to this template. 4. Create a page based on this template on staging side. 5. Publish to live. In this case the template has to be explicitly imported on live site in order to run a successful publish. 6. After the initial publish, modify the test portlet's preference on its configuration screen. 7. No changes are exported to live. 8. Upon testing I realized that not the latest change is picked up, so I had to remove the portlet from the template, then publish once to clear the live site's setup. 9. Create another page and add the portlet there and configure it. 10. Publish to live, including this newly created page too. 11. Add the portlet back to the page template without configuring it. 12. Verify on staging side that the preferences are not picked up from the portlet which is already on another page. Reconfigure it. 13. Publish everything to live 14. Later on to modify the portlet preferences on live it is enough to publish only the page where the portlet got configured.

          People

          • Votes:
            14 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Days since last comment:
              1 year, 29 weeks, 3 days ago

              Development

                Structure Helper Panel