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

Classic UI > Overrides #1467

Open
1 of 2 tasks
toalba opened this issue Mar 16, 2023 · 7 comments
Open
1 of 2 tasks

Classic UI > Overrides #1467

toalba opened this issue Mar 16, 2023 · 7 comments

Comments

@toalba
Copy link
Contributor

toalba commented Mar 16, 2023

Plone Documentation versions affected

  • 5.x
  • 6.x

Description

The code / method for overrides in Views, Viewlets, Tiles are nearly the same, as well as using overrides is common. This chapter can be mentioned in layers, views and viewlets.

I would suggest doing for them a own chapter in classic-ui.
Structure can look like this:

  • Overview
  • Override a View, Viewlet , Tile class. ( with the zcml attributes, explanation of layer usage)
  • How to override a template with z3c.jbot
  • Rest-End-point overrides ( as @jensens mentioned)
  • Examples
@toalba toalba changed the title Classic-UI --> Overrides Classic UI > Overrides Mar 16, 2023
@stevepiercy
Copy link
Contributor

How many different techniques are there to override all the things? It appears that there are 3 different techniques.

  1. Override a View, Viewlet , or Tile class
  2. How to override a template with z3c.jbot
  3. Rest-End-point overrides

Would "Override a View, Viewlet , or Tile class" be one description of a technique that applies to all three classes? If no, then this should be broken into three sections.

Do you intend to include examples at the end of the chapter, instead of for each object?

@jensens
Copy link
Sponsor Member

jensens commented Mar 16, 2023

Would "Override a View, Viewlet , or Tile class" be one description of a technique that applies to all three classes? If no, then this should be broken into three sections.

I would add "portlet"and similar view-like registrations. Tiles as a concept are not core, but in ecosystem and used as often as Mosaic is used.

as point 4, IIRC resources can be overridden as well.

@toalba
Copy link
Contributor Author

toalba commented Mar 16, 2023

Views, Viewlets and Tiles can all be overriden with the same technic. You only have to specify what is overwritten in the zcml file. what would be one word e.g.
<browser:page (Views)
or
<browser:viewlet (Viewlets)
or
<browser:tile (Tiles)

@toalba
Copy link
Contributor Author

toalba commented Mar 16, 2023

In terms of examples i would do what you suggest. In the end or with each object, I am not wise enough to decide there.

@stevepiercy
Copy link
Contributor

Examples belong with the thing you discuss, not at the end. Code is like a picture, which is worth a thousand words, and can help illustrate what you try to describe with words.

@toalba
Copy link
Contributor Author

toalba commented Mar 16, 2023

ok, good to know thanks

@stevepiercy
Copy link
Contributor

stevepiercy commented Mar 16, 2023

Taking @jensens feedback, here's a proposed outline of Title, section headings, and sub-section headings with mock content in Markdown format. Let's get @jensens's thoughts before you start.

Feel free to copy-paste the Markdown and start editing, inserting the usual HTML meta stuff that appears in each of the Docs files.

# Overrides

Chapter description for all the things.

## View-like registrations

General description that applies to all 4 view-like registration thingies.

### View

Description

Example

### Viewlet

Description

Example

### Portlet

Description

Example

### Tile

Description

Example

## Template overrides with `z3c.jbot`

Description

Example

## REST API endpoints

Description

Example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants