Is there a module that allows me to log all the searches made on a view ?
Thanks !
I think you will need to write custom code to achieve that! I'm assuming you know some basics about writing Drupal custom code. You will need to use a hook that gets called before your view is displayed. In the hook you should log whatever information you want e.g. the keyword that was entered in the exposed filter.
Please see http://drupalcontrib.org/api/group/views_hooks/6 for the hooks that are available to you in Views.
I'm guessing you would probably use something like hook_views_pre_render
Related
I am working with Drupal and Views module.
I am using the same theme with different Views.
I have created different pages which are listing nodes per viewname as this : views-view-fields--VIEWNAME--page.tpl.php but now when I click on an article title, I would like to personalize the node with the viewname, so I would like to use node-VIEWNAME.tpl.php, but it's not possible. The only thing I can do, is to create a node-TYPE.tpl.php but I do not want to follow this way.
So my question is how can I implement (may be with a hook function?) the node-VIEWNAME.tpl.php when I click on an article title (so when I have only one full article and which is defined by it's id in the url. This is for precision, I am not fluent in English.
Thank you very much !
Alexandre
The correct way to do what you're attempting - use the Display Suite module, set the view to point to a Display Suite object in the field settings, then click the gear next to that setting and pick the build mode you want to use. Then in your template.php file, do whatever special work you need to do to that build mode.
I need to create a new filter for my view inside php snippet. Is it possible to do that using Drupal API? Can you also give me code example if possible?
Thank You,
Toliy
Your comment made much more sense ;)
What you are asking for is easily possible with Views out-of-the-box. Specifically, when you are in Views, lookk for the section called "Views arguments". To get you started there is a massive tutorial on drupal.org about them.
The path to your page will be something like:
movies/year/%
The character '%' signifies an argument
A long shot..I know.
Is it possible to detect if a view's page display path is changed via views UI? Is there some kind of hook that I could use for this?
I'm not sure how the Views UI is implemented, but one idea is to implement hook_form_alter() on the view editing form and detect any changes to the values with a custom submit function.
Maybe you should make the short story long.
You can't to the best of my knowledge hook into changes in a view when they are made.
You can however create the view as a feature and detect any changes made that way by storing the view as code.
I Am new to drupal I need to customize core functionality like register module and event module.please share you thought / sample code / sample website for get the clarification over my issue
Thanks in advance
Balaji
From what you posted in the comment to creejayoz answer, it seems like what you are after is not using hook_form_alter, but something in the line of what the profile module does. It's part of drupal core, and with it you can add extra fields to the user like first and last name. There are also more advanced modules that you can use instead, but it seems like you wont need it. Using the profile module will also be a lot quicker and easier than using hook_form_alter as you wont need to create a db table make SQL and such to the save the data.
You can use hook_form_alter to heavily modify the way Drupal's registration works, by modifying the form's fields, adding extra validation/submit functions, etc. It's difficult to give more detail without knowing what you're wanting to do.
How can I categorize/organize the content types on my "Create content" page? I'm running Drupal 6.x with CCK. I have a lot of custom content types, and my "Create content" page has become a bit unwieldy, as it lists them all alphabetically. I'd like to organize them by category, so users would see something like:
Create Content
Reports
Report Type A
Report Type B
Events
Event Type A
Event Type B
I don't want to mess with Core, but anything else (custom module, theming, existing module functionality) is fair game. I'm hoping I'm missing something easy, because this seems like an obvious requirement, but all I could find on the Drupal site were these unanswered questions:
Organize Create Content Page
(node/add)
Core: Split create
content page into categories?
You should be able to accomplish this in a custom module, without hacking core.
You'll want to implement hook_menu_alter() to take over the callback function for node/add.
Something like
function mymodule_menu_alter(&$items) {
$items['node/add']['page callback'] = 'mymodule_node_add_page';
}
should get you started. You would then create the function mymodule_node_add_page, and you could use the original callback function as a starting point.
You can also do this at the theme level by overriding theme_node_add_list().
There are some different ways to attack this problem. You can overwrite the old form page or just create a new one with a custom module. Doing that you can in your module do whatever your want.
Another possibility is to do the same thing using views instead. Doing that gives you access to a lot of powerfull features, as you can do anything the views module lets you do. You can create different ways of sorting the content types.
I've heard of many who have used views to make a page like this for the create content page. Which method you choose is up to you, depending on how exactly you want to do this and the data you have associated with your content types, one will be more easy than the other. But without knowing the exact details, I can't say which. I would advise you to start out with views, since you quickly should be able to find out, if you can use it to get what you want.
there's a module that does what you are looking for, Content type groups
I created a sandbox module some time ago which was supposed to do this:
https://drupal.org/sandbox/YaronTal/1260038
The only problem is that I wasn't able to create the admin backend with draggable interface at the time.
I know the issue is old, but just in case someone else has the same problem...