![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 78 Pomógł: 1 Dołączył: 25.03.2008 Ostrzeżenie: (0%) ![]() ![]() |
Witam,
Mam sobie moduł "newsletter_history", który generuję za pomocą "symfony generate-admin". Stworzyłem sobie partiala "_newsletter_attachments" w "newsletter_history/templates", który ma wypisywać nazwy załączników danego newslettera. Problem w tym, że partial działa tylko na liście, zaś w edycji już nie. Wyrzuca błąd "Notice: Undefined variable: NewsletterHistory". Z tego co czytałem ten obiekt powinien być dostępny w partialu właśnie pod nazwą klasy - tylko dlaczego na liście jest dostępny a w edycji nie? Oto fragment pliku generator.yml: Kod list: hide: [ body ] display: [id, created_at, title, is_free, _newsletter_attachments] edit: display: [id, title, body, _newsletter_attachments] Cała zawartość "newsletter_history/config/generator.yml": Kod generator: class: sfPropelGenerator param: model_class: NewsletterHistory theme: admin non_verbose_templates: true with_show: false singular: NewsletterHistory plural: NewsletterHistorys route_prefix: newsletter_history with_propel_route: 1 actions_base_class: sfActions config: actions: ~ fields: created_at: { label: Data utworzenia, date_format: "yyyy-MM-dd, HH:mm"} is_free: { label: Czy darmowy } list: hide: [ body ] display: [id, created_at, title, is_free, _newsletter_attachments] filter: ~ form: ~ edit: display: [id, title, body, _newsletter_attachments] new: ~ Zawartość "newsletter_history/templates/_newsletter_attachments.php": Kod <?php
$arr01 = $NewsletterHistory->getNewsletterAttachmentss(); foreach($arr01 as $attachment) { echo $attachment->getName() . "<br>"; } ?> Ten post edytował zwierzołak 22.06.2010, 10:22:33 |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.08.2025 - 07:38 |