Drupal excessive menu parts - drupal

In a module development (webtv) I am providing a generic block that can be configured for its contents (playlists). On the configure form there is a list of added contents (playlists) along with links "add new playlist" and "edit" existing one placed next to each entry. As the block configuration path is: "admin/build/block/configure/[my_module_name]/[block_delta]".
And I am expecting to add/edit playlist form on a separate page and should be accessible on:
admin/build/block/configure/[my_module_name]/[block_delta]/playlist/add
and
admin/build/block/configure/[my_module_name]/[block_delta]/playlist/[playlist_id]/edit
For this I added two entries in hook_menu with page callback as drupal_get_form and page argument as form defining function.
After clearing cache and running cron, links does not server playlist add/edit page but redirects to block configure page.
What am I doing wrong? Is it possible to extend block configure page into sub pages?

The maximum allowed menu parts in a drupal(6) URL are limited to 7. In my problem I have quoted paths with 8 and 9 parts that was the issue.
admin/build/block/configure/[my_module_name]/[block_delta]/playlist/add
admin/build/block/configure/[my_module_name]/[block_delta]/playlist/[playlist_id]/edit
In Drupal 7 the limit is expanded to 9.
It can manually be changed in the file drupal/includes/menu.inc as define('MENU_MAX_PARTS', 12);

Related

How do I add a module to the text of a basic page in drupal 7?

How do I add a module to the text of a basic page in drupal 7 ?
I need some help. I am having some problems with the drupal donations module
I have done this before on this web site
http://www.arguemax.com/_drupal-7.26/content/donate-using-paypal
But now I can;t remember how I did this.
How do I put this module on a page I am creating? When I go to create the page, there does not seem to be an option to past complex tables or controls on it. I just has a large empty text area to edit the body of the text
I thnhk this is a simple thing.
I was able to find the setting for
Home >> Adminstration >> Configuration >> Web Services == PalPal donation
and that set up the control
So I know it is ready to plop into the page
How do I plop it into the page? I remember there was something like a button bar associated with the text editor for the page that allowed me to add complex items like tables and like this particular module.
As can be read in that module's Documentation, the module creates two blocks.
The steps you need to follow:
Create an empty node of any content type. You can alter the URL and attach it to a menu item as well.
Go to admin/structure/block and find the blocks your module provides.
Hit "configure" on one or both of them.
In each block's settings, in the "pages" section (bottom of your screen) select "Only the listed pages" and enter the url of the empty page you created before.

Prepopulate Content Type Args when going to /admin/content in Drupal 7

I created a Drupal site. The admins who will be using the site for content management have no Drupal knowledge and I have been tasked with making this as easy as possible for them. I'm creating an admin control panel and I want a quick link that takes them to the admin content page, but with the "content type" prefilled. For example, for content I have pages, events, resources, and testimonials. I want to provide them with a quick link for editing content type EVENTS only. So it would go directly to admin/content with the type filter set to "events". The URL does not currently add args or anything like that.
Anyone know of a way to do this?
yes you can do this- just use this module: Drupal admin views which supports a REGULAR VIEW for admin/content. The View is set to use ajax though- just remove this option and save it and call /admin/content then. There you will see the resulting filters in the URL (you can even set their keys to a value you like inside the view). Set back to use ajax (if you like) and use the keys in the URL for type it's simple just call /admin/content?type=YOURTYPE

Drupal 7: Adding a 'Add New Listing' (Create Content) Link on Local Tasks Menu

I am working on making user pages for a certain type of user who can add/edit/delete content on my Drupal site. I've figured out how to use Views to create a 'Manage Listings' tab which appears on the user's profile, now I need to make another Local Task tab (or any kind of link) that allows the user to add new content.
I tried just adding a header to the view using basic markup text that contains:
Add New Listing
But because the link is displayed from the 'users/admin/' page, the link ends up bringing them to 'users/admin/node/add/' which doesn't exists (obviously). How can I create a create content link without messing up the path?
Below is a visual for help:
Please excuse the fact that this is a very simple question - this is my first attempt at building a Drupal site.
use /node/add instead because then it is relative to url instead.

Drupal 7- How to make a custom module for only front page?

so..I created page--front.tpl.php in my theme directory and it works fine.
now, how do I make a variable that can be used in the page--front.tpl.php?
I can write my php codes inside page--front.tpl.php, but I think there is a better way.
added:
on the front page, I am going to query video and news nodes ONLY. That is why I want to make a new module for only front page.
any suggestions?
I'm not sure what you are trying to achieve here, but OK. You have two options: one is what you're doing now. Write your custom PHP in page--front.tpl.php and you'll be fine. The other is ditching the file and working only with page.tpl.php.
The variable $is_front tells you whether you're on the front page. You can write custom PHP in a conditional block: if ($is_front) { ... }.
Also, you can create a custom block (a view, perhaps, depending on your needs) and set its display restrictions to "only on the listed pages" - and list there. You'll have a custom view loaded only on the front page.
All you need to do have a custom front page is configure your front page in the site information settins (admin/settings/site-information in D6).
Creating a module to display that content is then a completely different thing.
What I would really suggest is looking at Views if you don't know it already. That allows you to build lists of things (nodes, users, ...) and expose them as pages, blocks, rss feeds and much more. You can create a list of nodes with types video and news, expose that as a page and then just point your front page to the path of your view.
you might try using the views module to create your list of videos and nodes. You can set a views page to be your homepage in the site settings.

Drupal : How to export node content to other website?

I want to fetch contents from my Drupal site and show it on another site using CURL. I already have a module that creates a URL (menu) in Drupal and outputs the requested node using node_load() method. This way, I can select which specific fields to output to the requesting site.
However, I also have a module that alters the node's content. What is does is when a node is viewed, it looks for the img tags in the content and replaces the source attribute with its thumbnail version. In this module I look for a specific attribute of the node :
$node->content['body']['#value']
And replace the img tags if present..
My problem is when i call node_load() in the menu I defined on the first paragraph, it doesnt have that $node->content['body']['#value'] that's why the image tags are not replaced..
Thanks!
Use node_view to theme the display of the node and invoke modules changing the node output.

Resources