Download & Extend

Allow admins to specify a css selector to attach the content type selector to

Project:Content Type Selector
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

I am running a test site for developments of a live site. Have got quite a few modules on it, to replicate the effects should I put a module on the live version. All running modules on test can be viewed at http://test.tidarandinn.is/colophon.

Content Type Selector is enabled as the Colophon page shows but the dropdown box is not appearing in content type view (i.e. admin/content/node-type/book/fields).

I have devel module enabled but it doesn't display any errors or failed attempts at loading / displaying.

thanks
Elfur

Comments

#1

Status:active» postponed (maintainer needs more info)

The output for content type selector is rendered in the help section of the page, using hook_help(). So maybe this is related to the theme? Have you tried with Garland?

Can you see any javascript error on the page?

#2

Status:postponed (maintainer needs more info)» fixed

Yes, that's the case. Works with Garland. Need to make room for hook_help() in my theme.

This might be a helpful comment in the readme.txt.

Very convenient little module, now that I realise how it works :)

thanks
Elfur

#3

Ah, good to know.

The module code is so small that I didn't thought about adding a note about hook_help(). I'll see if I can add something to the project page, just in case. ;-)

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#5

Hi!
Congrats for the useful module!. I have a problem showing this in Zen_classic theme. I've checked and in the node.tpl.php appears:

<?php
print $help;
?>

But the switcher does not show.

#6

Lost it too when I changed from Garland to Artisteer-generated theme.

#7

Component:Code» Documentation
Status:closed (fixed)» active

Make sure your theme displays the #tab-wrapper div.
Content Type Selector won't display itself unless it finds that DOM element.

In the Acquia Prosper theme, (in which the selector wasn't displaying,) I found where $tabs were being printed:

<?php print theme('grid_block', $tabs, 'content-tabs'); ?>

And wrapped it with <div id="tabs-wrapper>:

<?php if ($tabs): ?>
  <div id="tabs-wrapper" class="clear-block">
    <?php print theme('grid_block', $tabs, 'content-tabs'); ?>
  </div>
<?php  endif; ?>

(Note that I also had to tweak the theme styles, as, even though I could see the selector I couldn't click it -- the tab bar was being displayed atop.)

I'm re-opening this issue as a request that the module docs also make note of this.

#8

Status:active» needs work

Oh, I see.

I'm marking this issue as "needs work". Not only related to documentation, but maybe there's a better way to control the visibility of the select box that is more compatible and/or adaptable to other themes. I'll try to think about it as soon as I have a bit of time.

#9

Hi you all,

I confirm that it was not appearing on my theme until I discovered that even zen theme was not showing the type selector widget. Finally I've realized that garland was embedding the $help variable inside that id="tabs-wrapper", which in fact is quite a particular way to mark it. In my theme I just expected to have a .

Uhmm, well, it's not enough to tell on your module page that

<?php
print $help;
?>
is required, but also that it has to be inside some div with the "tabs-wrapper" identifier in order to be properly displayed :-)

Thanks anyway for that little helper :-)

#10

Confirming the issue for the admin administration module which is based on the Rubik theme; that one is based on the Tao base theme. I'm using Rubik/Tao as administration theme.

Greetings, -asb

#11

Issue applies also to the TNT theme Magazeen.

#12

Component:Documentation» Code
Status:needs work» needs review

Here is a patch that adds a settings screen where the admin can set the css selector to use when adding the content type selector to the page.

This way the admin can specify a place that suits their theme.

The patch should apply to 6.x-1.2 and 6.x-1.x-dev cleanly.

The content_type_selector.admin.inc file might be overkill for such a small module but i figured I'd go with the standard.

AttachmentSize
content_type_selector-custom_css_selector-541798-12.patch 4 KB

#13

#14

As an example, I am using the rootcandy theme and for the new css selector option I use:

#content-wrap .content-in

Which works pretty nicely.

#15

Title:Content selector not showing in content type view.» CSS selector for Rubik theme

In Rubik, I attached it to #page-title. Works pretty well. Thanks for the patch, @rooby.

#16

Title:CSS selector for Rubik theme» Allow admins to specify a css selector to attach the content type selector to
Version:6.x-1.2» 6.x-1.x-dev
Category:bug report» feature request

Not the best title but it gets the point across.

nobody click here