Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page decoration #27

Merged
merged 11 commits into from
Sep 12, 2018
Merged

Page decoration #27

merged 11 commits into from
Sep 12, 2018

Conversation

johanjanssens
Copy link
Member

@johanjanssens johanjanssens commented Sep 8, 2018

This PR implements the ability to decorate an existing Joomla menu item or page. The Joomla rendering cycle is intercepted after the active component has been dispatched and the returned by the component is then injected in a page to be decorated.

Setup

To decorate an existing menu item or page create a page with the same name as the menu item alias, or the page route.

Example: http://mysite.com/path/to/menu => /joomlatools-pages/pages/path/to/menu

In the page place a <ktml:content> which will acted as the placeholder for output generated by the component and then place mark around it. The decorated result will be injected back into Joomla after processing.

Frontmatter

This PR adds and additional process modifier called decorate which specifies the decoration level. The decoration level specifies how deep the decoration takes effect. Possible values:

  • 0: only decorate the specific page
  • x: decorate as deep as x
  • true: decorate all (default)
  • false: do not decorate

Notes

  • Frontmatter defined in the page will overwrite the Joomla menu item settings. If no frontmatter is defined the menu settings will be used. Example:
title: Title override
summery: Description override
  • A menu item exists in the Joomla menu structure and is linked to a component, a page doesn't exist in the Joomla menu structure it's generated by the component.

For example: http://mysite/[articles]/[uncategorised/myarticle]

  • articles is a menu item that links to the Joomla content component using an 'List All Categories' menu type.

  • uncategorised/myarticleis a page generated by the content component. It shows the article with alias myarticle that is part of the uncategorised category.

@johanjanssens johanjanssens added this to the 0.4.0 milestone Sep 8, 2018
@johanjanssens johanjanssens self-assigned this Sep 8, 2018
@johanjanssens johanjanssens merged commit 672d25d into master Sep 12, 2018
@johanjanssens johanjanssens deleted the feature/24-decoration branch September 12, 2018 23:36
@johanjanssens johanjanssens mentioned this pull request Jan 8, 2019
@esedic esedic mentioned this pull request Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant