I'm developing a site where I need to provide a few default submenu items for a content type. I want each node with that content type to display a few default submenu items, mainly views. E.g. Creating node "Example node" and viewing the node would display a menu with a link to a view taking the node id as an argument (node/nid/employees). The list probably needs to be creating with ordinary menu items because they need to be able to insert new links and/or reorder the existing ones.
Where can i find example login form code (php) for D7? I would like to paste it at the block. I know that there is a default block which contains login form but my aim is to to create a block where login form is not the only content.
Very sorry if this is the wrong place to ask this question - or if it is covered anywhere else. I have been searching for how to do this for a while and am confused as to the best way.
When a variable is set, say the 'user_failed_login_ip_limit' var in the user module. How should I over write this? Obviously I could change it there in the core, but having started to use hook functions and themes I have come to see the beauty of the 'cascading' way Drupal works.
Hello,
I'm developing a theme with many page template (one for the home page, one for the gallery page, one for the contacts page, and so on) and I want to load different javascript source files for each of these pages.
I understand that I have to build different tpl files naming them as page--page1.tpl.php , page--page2.tpl.php and so on.
I also know that I can load javascripts with a drupal_add_js() function in the theme_preprocess_page() function in the template.php file.
My question is, how can I select wich javascript must be loaded in which tpl?
What is the best way to change the value of certain fields of node just before rendering them?
I store data from external API in nodes and fields. When user clicks on a node or drupal access it, I want to check if data is the same in my node and in the API.
So the logic is - viewing node:
get nodeid from args
call function that checks if field changed date is less than today if it is, fill fields with API data
It works with two browser refreshes - the problem is that page object already has old data and then I try to change the data...