Ticket #2459 (new enhancement)

Opened 2 months ago

Refactor how the Unsubscribe "page" is accessed

Reported by: sharvey Assigned to: nlou
Type: enhancement Priority: medium
Milestone: Component: Modules - newsletter
Version: Severity: medium effort / impact
Keywords: Cc:
Due date: Harvest Task: (Unknown)
Invoice sent to client: 0 Hours:

Description

$UnsubscribeLink? should return the link, not the entire <a> element.

Unsubscribe_Controller extends Page_Controller, this should also have an Unsubscribe extends Page data record, so it can be in the CMS. Otherwise, we're relying on hacks to fake a data record. It also means you can customise the Unsubscribe page in the CMS!

See r53210 on why this is a bad approach, to have a controller without a data record.

Finally, $UnsubscribeLink? should do a DataObject::get_one('UnsubscribePage?') to find out the link. This is similar to how we discover the CheckoutPage? record in the ecommerce module!

Attachments

Note: See TracTickets for help on using tickets.