Skip to content

Passing Data #6

@michaelcummings

Description

@michaelcummings

I keep running into problems passing data to the views in the themes. Am I missing something?

Normally you pass data from your controller to your view by passing your $data[] array, but I can't seem to get this to work like normal. I've tried ever possible method I can think of to get the value out, but I keep getting various different error messages depending on the method.


A PHP Error was encountered

Severity: Notice

Message: Undefined variable: bio

Filename: basic/index.php

Line Number: 78


I get a similar message no matter how I try and access it:

$this->theme->get('bio')
$this->get('bio')
$this->bio
$this->data['bio']
$this->data('bio')
$bio

None of these work in my theme view...

Your example themes do not pass variables to the themes so I'm unclear how you're doing accomplishing this...

Maybe I'm missing something simple, but I'm just utterly confused at the moment why I can't get this to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions