Dynamic Portlet click to select the style and portlet Style

Source: Internet
Author: User

Dynamic Portlet click to select the style and portlet Style
1. Background

In the process of configuring the help information of the company's cloud platform, because the data URL of the dynamic portlet used obtains static data, there is no way to make the selected logic judgment in the background, therefore, you need to control the style of the selected list on the foreground. Here we will introduce how to change the style of the selected list on the foreground.

2 intended readers

Internal staff of shutong changlian
IT Industry enthusiasts

3. Glossary
  • Full-dynamic Portlet: displays the preset display Portlet that allows you to control the display style by using a template.
  • Static Data: Use a template to define the simulated data.
4. Implementation

Add the selected css to the dynamic display template and define the id attributes for the li and a tags. The frontend callback function sets the selected style for the current li tag by comparing the IDS.

5 implementation steps

Because the hyperlink of tag a in the list is used to refresh the page (href redirects to the current page, so refresh the page) at the same time, add parameters to the Address url so that the information body portlet on the right can obtain the parameter value. Therefore, you can use the callback function to obtain the parameter value in the url.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.