ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Pages Module: Hide Templates in channel publish page drop down

January 17, 2011 7:27am

Subscribe [4]
  • #1 / Jan 17, 2011 7:27am

    Neil Evans

    1403 posts

    ***
    1. First testing version is below at post #6: http://ellislab.com/forums/viewreply/845698/
    ***

    If like me it drives you nuts handing over a project to client and then having to tell them that when using the pages module ignore xxx templates and just use yyy templates… then you might like this…

    I am about to release an extension that allows you to manually define which templates are visible on the Pages Tab on the Channel Publish page.
    You will be able to enable/disable different templates per channel, and select a default template to be used.

    It is pretty much working for me right now, and i will get a test version up here for people to try… but before i do is there any obvious other features that should be included in this. (no not massive features, just obvious settings really!!!)

    Thanks, N

  • #2 / Jan 17, 2011 8:39am

    iain

    317 posts

    Great minds think alike and all that 😊

    I started writing a fieldtype which is a merger of the uri field, and the template select. Same idea essentially as yours where you could restrict the number of templates displayed, and choose a default template per instance of the field.

    Additional functionality I thought of was for the page uri field; it would be pretty straight forward to attach an autocomplete (or dropdown) for existing uris; so prepending an existing path is taken care of and you’d just have to enter the last segment.

    Alas this project I’m working on has murdered my free time so if you could roll that into yours, I’d be a happy punter 😊

  • #3 / Jan 17, 2011 8:53am

    Neil Evans

    1403 posts

    Hi Iain,
    I think I see what you mean - a field type to replace the pages module, restricting visible templates, and a pages URI auto-suggest based on existing values. Possibly a better way… The main thing i want to avoid is changing anything in the system that might impact existing sites (install-de-install-ee-upgrades, etc). So in theory, this just makes surface changes - hopefully!

    In terms of what i have - i am just using JS to modify the existing pages tab behaviour for the template drop down.
    But in the future i could add auto-suggest functionality - would need to think about best way of doing it.

    Just testing the extension now on fresh install, and testing what happens when no channels or templates exist. Once done i will get a testing version up for people to try in test environments…

  • #4 / Jan 17, 2011 8:57am

    iain

    317 posts

    My idea / intention wasn’t to modify/dick with any existing pages data…

    The fieldtype would simply have some js to remove the native uri and template fields from the dom, and as long as the inputs were named the same - the data would simply enter EE the ‘native’ way…

  • #5 / Jan 17, 2011 9:03am

    Neil Evans

    1403 posts

    ah i am with you… so effectively the field does nothing other than add JS - no browser visible options. makes sense.
    I have to say the hook i am using in the extension is less than ideal - i have asked in the development section for a better alternative - very quiet over there!

  • #6 / Jan 17, 2011 9:08am

    iain

    317 posts

    Almost, the fields would be output into the fieldtype/publish page via regular html, just the data generated wouldn’t be stored in the channel_data table, it would simply ‘take over’ the native pages fields on the publish page.

    Come time that Ellislab actually do something with the Pages module, the fieldtype could simply be removed and the publish process falls back to native fields.

    Yeah, they removed all hooks for modifying the cp in EE2 (bar the new css/js hooks), there’s a long thread kicking around where DJ discusses the reasoning behind the decision…

  • #7 / Jan 17, 2011 9:18am

    Neil Evans

    1403 posts

    Extension ZIP attached.
    ******************************************
    This is just for testing purposes at this stage.
    Please do not use on live sites
    This should be stable enough to use, but i promise nothing!!!
    ******************************************

    Simply drop the /m10_pages_disabled/ folder into /system/expressionengine/third_party/
    Enable extensions, and enable M10 pages disabled extension.
    Then configure in settings for that extension.


    Please let me know any issues or queries. N

  • #8 / Feb 06, 2011 8:18pm

    DavidG

    46 posts

    Just developing a site that could definitely use an add-on like this. Will give it a try. Thanks!

  • #9 / Feb 06, 2011 8:23pm

    Lisa Wess

    20502 posts

    Hey guys,

    Sorry about this, but I’ve removed the attachment as per the Community News Guidelines.  There are recommendations in there for better places to host your downloads.

    Thank you!

  • #10 / Mar 09, 2011 8:25am

    Mat-Moo

    350 posts

    Can I ask where this now hosted, where I can download from?

  • #11 / Mar 21, 2011 8:30am

    Neil Evans

    1403 posts

    Was not aware this was removed - goes to show there are better (or should i say longer and more drawn out methods needed) ways to support he community i guess!
    PM me if you want a look. N

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases