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

markus_petrux’s picture

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?

elfur’s picture

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

markus_petrux’s picture

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. ;-)

Status: Fixed » Closed (fixed)

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

kiko’s picture

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:

print $help;

But the switcher does not show.

Vote_Sizing_Steve’s picture

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

jeffschuler’s picture

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.

markus_petrux’s picture

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.

jorditr’s picture

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 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 :-)

asb’s picture

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

asb’s picture

Issue applies also to the TNT theme Magazeen.

rooby’s picture

Component: Documentation » Code
Status: Needs work » Needs review
StatusFileSize
new4 KB

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.

rooby’s picture

rooby’s picture

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.

dan3h’s picture

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.

rooby’s picture

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 » feature

Not the best title but it gets the point across.