blob: 8512da7cbbe970989c84b0349f956b828f7a2b2c [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<ui:composition template="/main.xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:tc="http://myfaces.apache.org/tobago/component">
<ui:param name="title" value="Meta"/>
<tc:panel id="meta-panel">
<p>
Sometimes it might be useful to define
<tc:link label="HTML Meta Tags" link="https://www.w3.org/wiki/HTML/Elements/meta"/> in a page.
You can set e. g. search keywords anywhere on a page like
<demo-highlight language="markup">&lt;tc:meta name="format-detection" content="telephone=\#{metaController.formatDetection ? 'yes' : 'no'}"/></demo-highlight>
The result is a meta tag in the HTML head.
Tobago will render these meta tags automatically, if they aren't defined:
<demo-highlight language="markup">&lt;meta charset='UTF-8'>
&lt;meta name='viewport' content='width=device-width, initial-scale=1.0'></demo-highlight>
</p>
<p>
<tc:meta name="format-detection" content="telephone=#{metaController.formatDetection ? 'yes' : 'no'}"/>
This example toggle the Phonenumber detection on some smartphone browsers.
<tc:selectBooleanCheckbox value="#{metaController.formatDetection}"
itemLabel="format detection">
<tc:event />
</tc:selectBooleanCheckbox>
By selecting the checkbox a
<br/>
Example phone number: +1 234 567 890.
</p>
</tc:panel>
</ui:composition>