Details

    • Type: Feature Request
    • Status: Contributed Solution
    • Priority: 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.fernandez 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.fernandez 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 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 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
        vsimonaitis 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
        vsimonaitis 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 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 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 Randy Zhu (Inactive) 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 Randy Zhu (Inactive) 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 Ádám T. Nagy (Inactive) 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 Ádám T. Nagy (Inactive) 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.
        Hide
        olaf.kock Olaf Kock added a comment -

        It looks like this was implemented as LPS-47392 - at least I see some overlaps between the first contribution pullrequest by Oliver Teichmann here and the current master. Seems that the interface has changed a bit since then (e.g. from a String parameter to Map) and I admit that I didn't try out a lot - just stumbled upon this issue in "contributed" state, checking if it can be closed.

        Show
        olaf.kock Olaf Kock added a comment - It looks like this was implemented as LPS-47392 - at least I see some overlaps between the first contribution pullrequest by Oliver Teichmann here and the current master. Seems that the interface has changed a bit since then (e.g. from a String parameter to Map) and I admit that I didn't try out a lot - just stumbled upon this issue in "contributed" state, checking if it can be closed.

          People

          • Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            olaf.kock Olaf Kock
          • Votes:
            15 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development

                Subcomponents

                  Structure Helper Panel