cck themin input forms
אני מנסה לערוך עיצוב לסוג תוכן שהגדרתי ב cck לאחר גיגול מצאתי כמה מדריכים טובים מאוד בנושא
www.lullabot.com/articles/modifying-forms-drupal-5-and-6
מוצגות שם שתי שיטות אחת בתוך פונקציה hook_form_alter
והשניה בתוך template.php לרשום פונקציה ואח"כ לבצע את השינויים .
שתי הפונקציות מטפלות במשתנה form$. אני הצלחתי לעשות Unset לכל האלמנטיים שבאו מה core אבל באלמנטים שיצרתי
בcck לא הצלחתי לגעת בכלל באף אחת מהפונקציות(השינויים התקבלו במערך אבל לא באו לידי ביטוי ב html)
ניסיתי לעשות בשתי המקומות form_render אבל זה לא עזר . אני רוצה להציג את הפורום בתוך page.tpl.php ולכן הטופס בעצם מיוצא כ contetnt
לדף דרך ה hook_preprocess_page שמה אני לא מצליח לראות את השינויים
בברכה

הפתרון נמצא
הפתרון נמצא כאן
drupal.org/node/726282
והעניין הוא שהפקדים שבאים מ ה cck מתרנדרים
אחרי הפונקציה form_alter
ולכן הם צריך להוסיף עוד hook ->
after_build ושם לשנות את הנתונים שרוצים
(הכותרת היתה צריכה להיות theming אבל פשוט התפספס לי ה - g
form_alter is not the way , i
form_alter is not the way , i think it is very bad to make alter to cck fields
the method with hook_theme is desirable , you could use from_alter just to know $form['#theme'] value is
then define hook_theme to add tpl or theme function for that form
the function for theming forms is drupal_render and not form_render
you should use it insude your them function or tpl file to render individual form elements then wrap them in whatever html you like
yakoub abaya