Add Content Layout Mappings to Templates
After you create the content layout, you can add it to local templates in your Developer Cloud Service project by adding a content layout mapping.
Use the cec add-contentlayout-mapping
command to add a content layout mapping for a template. The content type that the content layout is based on (-c
) and the template that the mapping is for (-t
) are required. For example:
cec add-contentlayout-mapping Blog-Post-Detail-Layout -c Blog-Post -t BlogTemplate
The default content layout mapping is the Default style for desktop. You can specify the –s <layoutstyle>
option to specify a different layout style, such as Overview or Details, by name:
cec add-contentlayout-mapping Blog-Post-Detail-Layout -c Blog-Post -t BlogTemplate -s Details
You can also set the mapping for mobile with the –m
option:
cec add-contentlayout-mapping Blog-Post-Detail-Layout -c Blog-Post -t BlogTemplate -m