Results 1 to 4 of 4

Thread: Alternate module wrapper not working for News Module?

  1. #1
    Join Date
    Jan 2007
    Posts
    139

    Default Alternate module wrapper not working for News Module?

    I've done alternate wrappers a dozen times now, but I can't seem to do it for the News Module (and perhaps it may not work on any of the "default" modules?)

    To be a little more specific, I have a few settings for the News Module customized on this page. Is it possible that when the module is customized on a page that it ignores ALL of the default settings.. meaning the alternative wrapper setting? (Since you can't customize that on each indiv. page)

    I've even tried different wrapper code. I simply copied the default wrapper template, and changed ONE thing, to make sure it wasn't something wrong with my wrapper code.

    -----

    You know, what I think the issue is (and it just this second occurred to me) is that the code for grabbing the wrapper template is hardcoded into the news.php file. Doh! I remember seeing this a lot when making custom versions of the news.php file. I also don't think you can tell news.php to use different templates for the actual code either, but I'm not sure there's a way around that.

    So, basically, it's either make the alternate module wrapper setting work with news.php, or remove the option?

  2. #2
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Alternate module wrapper not working for News Module?

    Which version of the CMPS are you running? The wrapper template was hard coded into the file before, but that should have been corrected in v3.0 RC2.

  3. #3
    Join Date
    Jan 2007
    Posts
    139

    Default Re: Alternate module wrapper not working for News Module?

    That's odd, as I'm running RC2.. And indeed, it does use "fetch_template($news_wrappername)" in the code.

    I can't really test this anymore without messing up the work I've done on my News page.. I'd like to help figure out why it wasn't using my custom wrapper, but there's not really much else I can do.

    Is there something basic I might be missing? I kept "Use Wrapper" set to "Yes", entered the name of my custom wrapper template in the input below it, and hit save. I've done this a dozen times before for my own custom modules and never had any problems.

    But, anyway, I figured out a better way to do what I was planning, without even using the module wrapper, but if I ever need to use one again, I'll just hardcode the file.

    ----

    I'm sure you know your own code, but maybe there's a reason that this line
    PHP Code:
    $news_wrappername = ($news['altshell']) ? $news['altshell'] : 'adv_portal_module_wrapper'
    Is still evaluating false for "$news['altshell'] even if there is one?

  4. #4
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Alternate module wrapper not working for News Module?

    Ahhh, looks like that would be the culprit. Not sure how it was working for me when I tested things, but this would be the correct code (just replacing $news with $newsmod)
    PHP Code:
    $news_wrappername = ($newsmod['altshell']) ? $newsmod['altshell'] : 'adv_portal_module_wrapper'

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Alternative Module Wrapper Template not working
    By iDaemon in forum Troubleshooting & Problems
    Replies: 14
    Last Post: 10-27-2007, 02:03 PM
  2. Custom Module Wrapper Not Showing For News Module
    By ThePhlexican in forum "How Do I..." Questions
    Replies: 9
    Last Post: 09-30-2007, 12:16 PM
  3. Simple Module Wrapper
    By [email protected] Cake in forum Modifications (version 3.x & 2.x)
    Replies: 0
    Last Post: 08-14-2007, 09:32 AM
  4. Alternate wrapper
    By nymyth in forum Troubleshooting & Problems
    Replies: 1
    Last Post: 08-09-2007, 12:03 PM
  5. HOw do I get the class of module shell to alternate?
    By Shreedhan in forum "How Do I..." Questions
    Replies: 2
    Last Post: 01-02-2006, 08:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •