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>
Now you know how to use the <liferay-util:get-url>
tag to scrape URLs.