Skip to content

Add macros for changing meta information from templates #4

@romanmatyus

Description

@romanmatyus

Create HeaderCollector as service for collecting information about HTML header.

Add macros {addTitle}, {setTitle}, {addDescription}, {setDescription}, {addKeywords}, {setKeywords}, {setRobots}. This macros save data's to HeaderCollector and HeaderComponent only write data's from HeaderCollector and AssetsCollector.

This allow use this template:

{* set header *}
{addTitle}{$row->title}{/addTitle}
{setDescription}{$row->description}{/setDescription}
{* ... *}

{* and other *}
<h1>{$row->title}</h1>
<div>{$row->description}</div>
{$row->text}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions