Blogger URL Constructor Operator Syntax
Operator | Meaning | Default syntax |
---|---|---|
path |
Make new URL path | URL path STRING |
appendParams |
Add parameter to the URL | URL params OBJECT |
params |
Add or replace parameters in the URL | URL appendParams OBJECT |
fragment |
Add / Replace a fragment | URL fragment STRING |
Blogger URL Constructor Operator [path]
path will create new url by combining URL and string character.
Example
<a expr:href='data:blog.url path "/search/label/foo"'> <span>Label Foo</span> </a>
Blogger URL Constructor Operator [appendParams]
appendParams operator allows you to add additional parameters to an url.
Example
<a expr:href='data:blog.searchUrl appendParams { label: "Foo" }'> <span>Label Foo</span> </a>
Blogger URL Constructor Operator [params]
params works like the operator appendParams, but with the difference that it does replaces all the existing parameters in the url if any.
Example
<a expr:href='data:blog.searchUrl params { m: "1" }'> <span>Label Foo</span> </a>
Blogger URL Constructor Operator [fragment]
The operator fragment can add or replace a fragment (#). A fragment is an internal page reference, sometimes called anchor. It usually appears at the end of a URL and begins with a hash (#) character followed by an identifier. It refers to a section within a web page. For example an Link with #foo in the end of a URL will go or scroll our view to section or element such as <div>, etc with id='foo'.
Example
<a expr:href='fragment "top"'> <span>Go to Top</span> </a>
Example Combined Operator
<a expr:href='data:blog.url path "/search/label/Foo" params { m: "1", max-results: "16" }'> <span>Label Foo</span> </a>