Вопрос

I cannot figure out how to access module I have installed. I did all the instructions (adding lines in config/main.php)

I want to access the index page of the module

my file structure from my basic root is the following

\assets
\css
\protected
  ...

  \layouts
    main.php  // I want to add a link in my menu, something like
                 array('label'=>'Vote', 'url'=>array('poll/index'))

  \modules
    \poll
      \views
        \poll
          index.php    

  ...
  \views
    \post
      index.php    --> basic page of my site

I'd like to access the index module page from my main menu ?

Thank you in advance

Это было полезно?

Решение 2

I change the path to

array('label'=>'Vote', 'url'=>array('poll/poll/index'))

and the page is accessible now but I got 'No results found' which is another story

Thank you

Другие советы

So, you add following lines in your main.php config file:

'modules'=>array(
        'poll',
             ...
         )

and you don't have access to poll/index.php file? What notice did you have in your browser?

EDIT:

Maybe, if you want to generate link try this:

<a href="<?php echo $this->createUrl('/poll/index') ?>">Link label</a>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top