Drupal 7 - Theming node add ?
Mình muốn customize giao diện trang node/add bằng file tpl.php nhưng vẫn chưa làm được.
Tại bài viết này: http://drupal.org/node/1006404#comment-3866658
có 1 hướng dẫn là thêm file theo dạng này:
page--node--add--blog.tpl.php (for blog)
page--node--add--story.tpl.php (for story)
nhưng mình thêm mà vẫn không được.
Bạn nào biết chia sẻ cách làm cho mình với :)
Read moreSpecial permissions to alter null fields and edit existing fields
Functions required:
<
blockquote>
drupal_hook_form_alter()
why? To check to see if fields are or are not null (note that "drupal" will be replaced with a suggested module name for anyone who thinks that this should be modulated)
dropdown()
Preferred/chosen method, due to its being concise. For larger sites, it would probably be best to use some kind of auto-complete function
foreach()
This is used to fill the drop-down with options (the variable $option will be used)
submit()
To initiate actions which will fill the form in question with the user entries made herein
How can you set Default catogories on the fly?
Is there a way I can set a default term for the "node add" form?
Here is my problem:
1.When a user first comes to a site they pick a geographic location which is taxonomy term for the "Location" vocabulary.
2.That term id is stored as a session variable.
3. The user later clicks a link to add a node, which also has the "Location" vocabulary .
4. I want the "Location" vocabulary to default to the term that is stored in their session.
5. they should still be able to change the term.
I am also using the Hierarchy Select Module.
Read more