Using Liferay Util Get URL

The get URL tag scrapes the URL provided by the url attribute. If a value is provided for the var attribute, the content from the screen scrape is scoped to that variable. Otherwise, the scraped content is displayed where the taglib is used.

A basic configuration for the <liferay-util:get-url> tag is shown below:

<liferay-util:get-url url="https://www.liferay.com/" />

Here is an example that uses the var attribute:

<liferay-util:get-url url="https://www.liferay.com/" var="Liferay" />

<div>
				<h2>We borrowed <a href="https://www.liferay.com/">Liferay</a>. Here it is.</h2>

				<div class="Liferay">
								<%= Liferay %>
				</div>
</div>

Figure 1: You can use the Liferay Util Get URL tag to scrape URLs.

Figure 1: You can use the Liferay Util Get URL tag to scrape URLs.

Now you know how to use the <liferay-util:get-url> tag to scrape URLs.

« Using Liferay Util Dynamic IncludeUsing Liferay Util HTML Bottom »
この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています