1 to 6 of 6
Hello. Recently I know akelos. I'm now a beginner but I want to enjoy this framework.
Firstly I tried http://akelos.org/docs/tutorials/booklink. But somethings didn't work. I found that there are differences between tutorial codes in akelog.org and GoogleCode's wiki. Simply the tutorial codes in akelos.org don't show Sintags in my browser(FireFox on Linux). I wonder I use Sintags as GoogleCode's wiki.
<http://akelos.org/docs/tutorials/booklink>
for /app/views/book/_form.tpl file
<p>
<label for="author">Author</label><br />
<?=$form_options_helper->select('book', 'author_id', $Author->collect($Author->find(), 'name', 'id'));?>
</p>
for app/views/book/show.tpl
<label>Author:</label> <span class="static"></span><br />
<http://code.google.com/p/akelosframework/wiki/Tutorial>
for /app/views/book/form.tpl file
<p>
<label for="author">_{Author}</label><br />
<?=$form_options_helper->select('book', 'author_id', $Author->collect($Author->find(), 'name', 'id'));?>
</p>
for app/views/book/show.tpl
<label>_{Author}:</label> <span class="static">{book.author.name?}</span><br />
First question is where did you download your copy of Akelos. It's preferable to do a svn checkout from http://svn.akelos.org/trunk/ . You should too use app/views/book/_form.tpl as the newer version (at akelos.org) suggests. It should be fine with:
/** app/views/book/_form.tpl */
<p>
<label for="author">_{Author}</label><br />
<?= $form_options_helper->select('book', 'author_id', $Author->collect($Author->find(), 'name', 'id')) ?>
</p>
/** app/views/book/show.tpl */
<label>_{Author}:</label><span class="static">{book.author.name?}</span><br />
Which version of PHP, Apache and MySQL are you using? Or do you have some other kind of setup?
-jyrki
Thank you jyrki. Before I posted my question to this forum, I have gotten copy of akelos from <http://svn.akelos.org/trunk/> and used app/views/book/_form.tpl.
If I write codes as your comment, it works on my environment. (PHP5.1.6 and MySQL 4.1.21 and apache 1.3.37) But the codes are not same with codes on <http://akelos.org/docs/tutorials/booklink>.
You commented as below:
<label for="author">_{Author}</label><br />
and
<label>_{Author}:</label><span class="static">{book.author.name?}</span><br />
But please check the tutorial on <http://akelos.org/docs/tutorials/booklink> using your browser. It describes as below by my browser(FireFox2.0.0.6):
<label for="author">Author</label><br />
and
<label>Author:</label> <span class="static"></span><br />
Then the tutorial codes don't use Sintags. I think that it should be fixed.
Hello!
The difference between
_{Author}
and
Author
is that the first one is in Sintags and marks the string for translation. It is then added to a file in app/locales/:controller/en.php. So
_{Author}
produces
Author // To be translated into current locale
Yes, it should be fixed and I'll do it as soon as I get some time...
-jyrki
EDIT: I have to eat my words. I cannot make updates to the website... I added a ticket to Trac though
You are welcome.
Bermi fixed the issue in r360, so now the tutorial is rendered in the right way =)
-jyrki
1 to 6 of 6