This no longer appears to work in Phalcon 2.0.3. My baseUri is appearing in the href.
echo $this->tag->linkTo(array($page->last,'>>', 'class' => 'paginator-button', 'local' => false));
Can anyone confirm?
|
Jun '15 |
4 |
351 |
0 |
This no longer appears to work in Phalcon 2.0.3. My baseUri is appearing in the href.
echo $this->tag->linkTo(array($page->last,'>>', 'class' => 'paginator-button', 'local' => false));
Can anyone confirm?
echo $this->tag->linkTo(array('/page/next', '>>', 'local' => false, 'class' => 'paginator-button'));
//output
<a href="/page/last" class="paginator-button">>></a>
echo $this->tag->linkTo(array('/page/next', '>>', 'local' => true, 'class' => 'paginator-button'));
<a href="/baseUri/page/next" class="paginator-button">>></a>
Here you go. Does this work for you? I could do with a sanity check. I'd like to know if I have a config issue or a bug or something else.
I am using a compiled version of phalcon 2.0.3 on mac yosemite.
echo var_dump($this->tag->linkTo(array($page->last,'>>', 'local' => false, 'class' => 'paginator-button')));
" string(56) ""<a href="/baseUri/86" class="paginator-button">>></a> "" "
==========================================
echo var_dump($this->tag->linkTo(array($page->last,'>>', 'local' => true, 'class' => 'paginator-button')));
" string(56) "" <a href="/baseUri/86" class="paginator-button">>></a> "" "
Yes. It's work for me. I am using zephir for phalcon compilation.
$ git clone https://github.com/phalcon/zephir.git
$ cd zephir
$ ./install-json && sudo ./install -c
$ git clone git://github.com/phalcon/cphalcon.git
$ cd cphalcon
$ git checkout 2.0.x
$ zephir build
Copying new kernel files...
Preparing for PHP compilation...
Preparing configuration file...
Compiling...
Password:
Extension installed!
Don't forget to restart your web server
$ sudo apachectl restart
$ zephir stubs #generate stubs for IDE in <zephir directory>/ide/
-- My software info: MacOSx 10.10, PHP 5.5.18, Zephir version 0.7.0b
Yes
return new \Phalcon\Config(array(
'database' => array(
'adapter' => 'Mysql',
'host' => '127.0.0.1',
'username' => 'root',
'password' => 'root',
'dbname' => 'test',
'charset' => 'utf8',
),
'application' => array(
'publicDir' => __DIR__ . '/../../public/',
'cacheDir' => __DIR__ . '/../../app/cache/',
'baseUri' => '/baseUri',
),
));
var_dump($this->tag->linkTo(array('/page/last','>>', 'local' => false, 'class' => 'paginator-button')));
var_dump($this->tag->linkTo(array('/page/last','>>', 'local' => true, 'class' => 'paginator-button'))); exit;
<a href="/page/last" class="paginator-button">>></a>
<a href="/baseUri/page/last" class="paginator-button">>></a>