Jump to content


- - - - -

getTemplate Issues...


  • Please log in to reply
26 replies to this topic

#21 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 20 October 2011 - 07:25 PM

I'm tempted to say "Delete it all, and reinstall".

But if you do this in your app
$this->registry->output->getTemplate( 'featuredcontent' );

var_dump( class_exists( 'skin_featuredcontent_0' ) );
var_dump( class_exists( 'skin_featuredcontent_1' ) );
var_dump( get_class_methods( 'skin_featuredcontent_0' ) );
var_dump( get_class_methods( $this->registry->output->getTemplate( 'featuredcontent' ) ) );
What does that give you?

#22 Mikey B

Mikey B

    Member

  • Members
  • PipPipPip
  • 20 posts
  • Location:United Kingdom
  • Real Name:Mikey
  • IPB Version:v3.2.x

Posted 22 October 2011 - 01:12 AM

This:

class skin_featuredcontent_0 { /** * Construct */ function __construct( ipsRegistry $registry ) { /* Make object */ $this->registry = $registry; $this->DB = $this->registry->DB(); $this->settings =& $this->registry->fetchSettings(); $this->request =& $this->registry->fetchRequest(); $this->lang = $this->registry->getClass('class_localization'); $this->member = $this->registry->member(); $this->memberData =& $this->registry->member()->fetchMemberData(); $this->cache = $this->registry->cache(); $this->caches =& $this->registry->cache()->fetchCaches(); $this->_funcHooks = array(); } }
bool(true) 
bool(false) 
array(1) { [0]=> string(11) "__construct" } 
array(1) { [0]=> string(11) "__construct" } 

Looks like it's only pulling the __construct class.

Tempted to delete it all and reinstall it myself tbh :D

#23 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 22 October 2011 - 09:59 AM

I simply cannot see what's gone wrong here. In my first post I've described exactly how I do it on my dev boards, and that works flawlessly.

Guess you haven't done any real development yet, so starting fresh is my recommendation.

#24 Mikey B

Mikey B

    Member

  • Members
  • PipPipPip
  • 20 posts
  • Location:United Kingdom
  • Real Name:Mikey
  • IPB Version:v3.2.x

Posted 23 October 2011 - 02:21 AM

Okie dokie :) Will do :D

Appreciate all the help, Martin! I'll let you know how I get on.

#25 Mikey B

Mikey B

    Member

  • Members
  • PipPipPip
  • 20 posts
  • Location:United Kingdom
  • Real Name:Mikey
  • IPB Version:v3.2.x

Posted 23 October 2011 - 04:15 AM

FWIW, I just re-set up my IPB. Brand new files, brand new DB. Same error. Maybe what I'm trying is for 3.1 and I'm developing on 3.2?

I used the buildInDev.php tool to set up IN_DEV again, as I tried to work it your way but it wouldn't have it :/

#26 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 23 October 2011 - 12:53 PM

Made you a screencast on how I do it when I set up a dev board :)
http://screencast.com/t/9RuvhlojJN3

#27 Mikey B

Mikey B

    Member

  • Members
  • PipPipPip
  • 20 posts
  • Location:United Kingdom
  • Real Name:Mikey
  • IPB Version:v3.2.x

Posted 24 October 2011 - 03:06 AM

Thanks for the video :D Followed it exactly (including the mikeyTest and importing of it) and it worked like a charm.

However when I created skin_featured.php it simply wasn't playing? I changed the line in the globalTemplate function (in the file) to read this: {parse template="featured" group="featured"} after creating the skin_featured.php with the method featured() and it didn't show it at all.

I wonder if all this is just something I'm missing due to template groups? I guess I'll just stick with skin_global.php :P




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users