I merged domain_menu to domain_conf, so user can change menu settting for affliates domain. Note, the domain_conf schema has changed to:

$schema['domain_conf'] = array(
'fields' => array(
'domain_id' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
'settings' => array('type' => 'blob', 'not null' => FALSE),
'menu_settings' => array('type' => 'blob', 'not null' => FALSE)),
'primary key' => array('domain_id'),
);

Comments

agentrickard’s picture

Category: support » feature

Can you file a proper patch?

agentrickard’s picture

Status: Needs review » Needs work

Please format your code according to Drupal conventions.

bforchhammer’s picture

StatusFileSize
new8.71 KB

Thanks, code works.

A minor thing: "resetting" the settings at the moment will also reset the menu settings - is that the behaviour we would like to have?

Attached patch file is a patch against rc3 with some minor changes. (junphine: I hope you don't mind :))

bforchhammer’s picture

Status: Needs work » Needs review

forgot to change the status..

agentrickard’s picture

StatusFileSize
new1.66 KB

Can someone tell me why the attached patch is not sufficient for this feature?

agentrickard’s picture

StatusFileSize
new1.73 KB

Second version adds a null option.

agentrickard’s picture

Version: 6.x-1.0-rc3 » 6.x-2.0-rc4
Status: Needs review » Fixed

Patch from #6 has been committed. If we need more advanced functionality, lets open a new issue.

najibx’s picture

Status: Fixed » Needs review

Patch #6 only providing a form to select :
Primary links menu:
Secondary links menu:

but patch #3 has not been committed, thus this functionality is not functioning. Why half way?

agentrickard’s picture

All the original Domain Menu module did, AFAIK, was allow changing primary and secondary links.

I don't really like the patch in #3. Adding a menu_settings column to Domain Conf strikes me as the wrong way to go.

aaron1234nz’s picture

Version: 6.x-2.0-rc4 » 6.x-2.0-rc5

The Domain Menu module also allowed you to restrict the menu items on the node add/edit pages. I have written a patch against the domain_conf module to add this feature. see http://drupal.org/node/202179#comment-1120065

agentrickard’s picture

Understood. Is it possible to do this without adding a column to the {domain_conf} table?

aaron1234nz’s picture

Yes, it just adds a setting just just like the rest of the settings in domain_conf

aaront’s picture

The patch in #3 (used in RC5) does not apply the chosen domain-specific menu items to the corresponding block version of that menu. If enabled, the block uses menu items from the Primary Links or Secondary Links menu rather than the specified domain-specific menu. Is this intentional? I expected both appearances of the menu to display the same menu items.

agentrickard’s picture

The patch in #3 will not be committed. We are debating how to implement its functionality into the patch that has been committed. (From #6.)

aaront’s picture

Sorry, I meant to say the patch in 6 rather than 3. (6 is included in rc5). Works well other than the blocks problem I mentioned. I need primary links to be a block -- suppose I could accomplish the same thing in a different way using domain blocks once it matures. Thanks for your work on both!

agentrickard’s picture

I see. Will take a look, as that is not intended behavior.

agentrickard’s picture

StatusFileSize
new1.68 KB

It looks like you will have to use Domain Blocks, the code used to load the menu block is different from that used to load the primary (and secondary) links. In the former case, it uses the name of the menu. In the latter case, it uses a configurable variable, which is what we manipulate.

Theoretically, we could create our own blocks to counter this problem (see the attached patch).

agentrickard’s picture

Status: Needs review » Patch (to be ported)
StatusFileSize
new1.08 KB

#17 has been committed. As has the attached, which adds a 'default_menu' for the node form.

I am still skeptical of the menu restrictions patch, which I think may cause weird issues if a node was created on one site and edited on another. That functionality (patch at http://drupal.org/node/202179#comment-1120065) may need a separate module.

I am going to mark this as 'fixed' and let people open a new issue to request different features.

aaront’s picture

The patch in 17 works great! Thanks very much for adding this; I think it is essential.

agentrickard’s picture

Status: Patch (to be ported) » Closed (fixed)