To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Ticket #45 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Support multiple instances of an engine

Reported by: boutell Owned by: boutell
Priority: major Milestone: 1.0
Component: apostrophePlugin Version: Symfony 1.4
Keywords: Cc: geoffd, dordille, rickybanister, agilbert, johnnybenson
Symfony version:

Description

This must:

* Allow you to have multiple instances of the same engine
* Make it possible to have distinct behavior for each instance
* Allow link_to and url_for calls on the current engine page to target that same engine page by default
* Allow explicit targeting of other engine page instances
* Allow explicit targeting of a specific engine page instance from a non-engine page.

Implementation notes:

* Document that route caching must be turned off and is almost always bad anyway (it's off by default in 1.3 and 1.4). Otherwise you'll get the wrong instance page a lot
* Distinct behavior isn't a problem - we can use the slug, or use the ID of the engine page as a foreign key in another table
* Make sure you look at getCurrentPage rather than getFirstEnginePage to determine what engine page instance a route should correspond to
* We can't fix url_for to support specifying an instance (note: it's worth double checking that there is truly no way to influence the context passed to the route). And we don't want to introduce a_url_for because doctrine route stuff wouldn't know about it. But we CAN push and pop the current engine:

aTools::pushEnginePage(slug)
Do whatever you want, it'll target slug rather than the current page or the first one found (when there is no current page)
aTools::popEnginePage()

Change History

Changed 2 years ago by boutell

  • status changed from new to closed
  • resolution set to fixed

This has been done.

The API for targeting engines is a little different from this ticket, see the documentation.

I also added a way to specify a specific engine page for the link to a particular apostrophe menu button. This is used to ensure that the apostrophe menu button for 'media' always goes to /admin/media, even if you're on a public media engine page at the time. Pass the page object as the fourth argument to the aGlobalButton constructor. Documentation for this will be merged shortly.

Changed 2 years ago by agilbert

  • milestone set to 1.0

Testing the batch modify plugin. Moving old, closed tickets to the 1.0 milestone so the roadmap is accurate.

Note: See TracTickets for help on using tickets.