Hello,
I'm trying to change the layout based on the admin routing param
within a custom 404 error function in app_error.php.
1. I can check for the existence of the admin routing param. It is
available via $this->controller->params['admin']
2. Can change it, for example: $this->controller->layout
Hi,
You could always first include a short inline javascript defining your
variables and after that include the external scripts. Something like
this
codeblock("
var someJsArr = " . $someArraySetByCake . "
"); ?>
link('someExternalJsScript.js'); ?>
This way you can use you variables inside
gt; 0 && array_key_exists('Page',$results[0]))
{
//assign all Translation results to named keys
foreach($results as $key => $page)
{
$translations
In response of Karim's request...
The standard way of implementing translations in the default cake core
is, to my opinion, very resource intensive. It uses a lot of sub-
queries when a lot of fields in a table need translations.
At this stage I'm using the following setup in my solutions:
Exam
hey wasn't set.
>
> On Feb 6, 8:54 pm, oleonav wrote:
>
> > Hi there,
>
> > I have some variables set using the Configure class in the
> > beforeFunction of the main AppController. I use for multiple things,
> > for example to set the title of the
Hi there,
I have some variables set using the Configure class in the
beforeFunction of the main AppController. I use for multiple things,
for example to set the title of the page.
I need a custom 404 error page, so I made a custom AppError class
containing the function error404, which overrides
Oct 16, 6:06 pm, [EMAIL PROTECTED] wrote:
> Good luck finding that your request is hard to handel concidering the
> compatibility issue. But i suppose that we could look around and get
> back to you. Why does it have to be on linux.. what is the problem
> with wxp?
>
> On 1
Hi there,
In my development setup I am using some shell programs to index
different kind of files via the exec command in php/cake. for example:
- Word files -> using antiword
- Pdf files -> using pdftotext
This works fine. But now we have to move the app to a production
environment which does n
Hi there,
I am also using subversion to mamage development of apps.
My setup is:
- Central subversion server; Manages all project under development
- Multiple development clients; Check in/out updated files to the
central server.
This setup works just fine. Question;
I want to be able to get th
One thing I came across was the fact that the columns for created &
updated should be of the type datetime and Null should be set to
'null' and not 'not null'
Hope this helps.
Olav
On Aug 27, 11:02 am, "Marc Schuetze" <[EMAIL PROTECTED]> wrote:
> According to the docs 'modified' and 'updated' a
I need to populate the breadcrumbs array from one or more controller
actions. How can I do this?
Any help?
thanks,
Olav Verhoef
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group
I have a model which loads a external xml file. It would be nice if
the raw results or better the parsed array holding the data would be
cached for a couple of hours.
So far i tried the following:
children[0]->children[2]->children[0]->children;
.
Stuff to p
Hello everyone,
I'm looking for a simple solution or plugin that collects all debug
messages in for example a hovering div or external window without
messing up layouts etc...
Anyone something like this floating around?
Thanks!
--~--~-~--~~~---~--~~
You received
I have a form which gives the ability to add 3 records of the same
model in one go.
--
create('Content');?>
//First record
input('Content.use',array('type' =>
'hidden','value'=>'yes'));
echo $form->input('Content.title',array('error' => array(
'VALID_NOT_EMPTY'
s at
> the same time (mostly in the admin area for defining name,
> description, etc... of an item). Has anyone found a method for editing
> multiple languages at the sameview?
>
Yes, I did find this out to. Not very useful.
> Oleonav, did you manage to get any closer to a satisfying so
Maybe a suggestion which does not infects performance;
1. Add a collumn to the photoset table containing the number of photos
in the set. You can use this in your users/view action with no loss of
performance
2. When adding or deleting photos to a set this collumn in the
photoset model needs to b
have for example VALID_NOT_EMPTY defined for my title column in
> the Post model, and I leave the input field for title empty in the add
> view a standard message is echoed.
> How can I alter the error message in cake 1.2? With cake 1.1 you could
> use the HtmlHelper and its "tagErr
y, but
this seems not to be the most elegant solution. Not very 'Cake' like.
Also in the controller function we have to parse things back again.
On Jul 19, 9:37 am, zwobot <[EMAIL PROTECTED]> wrote:
> Good question oleonav. I wondered how this works too.
> In general I want to
> I wonder how you got this data into your database:
>
>
> INSERTed manually by yourself I suppose.
Yes, I did.
> There are some tings in your edit function I do not understand
> oleonav.
> In my edit function I just use $this->Post->save($this->data)
Yes, I did. Even in my views the new var fullname is shown. The
warning is only given in a list/index view. A view or edit view does
not have a problem.
On Jul 13, 7:48 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 7/13/07, oleonav <[EMAIL PROTECTED]> wrote:
>
Following examples in the group I added a afterFind function in my
Contacts model like this:
function afterFind($result){
$result = parent::afterFind($result);
foreach($result as $key => $val) {
$result[$key]['Contact']['fullname'] = str_replace(' ',' ',
$val['Co
On Jul 11, 8:14 am, zwobot <[EMAIL PROTECTED]> wrote:
> I have done everything you said but I still did not manage to add a
> different language to an existing Post or Article.
>
> Maybe you could send me a working code example and a dump of your
> database?
Hi there,
I've tried the TranslationI
population of the translationsXXX arrays do not depend on setting
the locale config or something like this. They will always be
populated with all translations. I think???
Success.
On Jul 10, 10:12 pm, zwobot <[EMAIL PROTECTED]>
wrote:
> Thanks for your answer oleonav, unfortunately my array
Hi zwobot,
> My Model:
> class Post extends AppModel {
>
> var $name = 'Post';
>
> var $actsAs = array('Translate' => array('title' =>
> 'TranslationsAbstract', 'body' => 'TranslationsAbstract'));
>
> }
>
> ?>
I'm also still figuring out how to use translation in add & edit
act
Hi there,
In my Article model two translated fields are used, title &
content.The Translation behavior is used. The Article model looks like
this:
class Article extends AppModel {
var $name = 'Article';
var $actsAs = array('Translate' => array('title' =>
'TransTitle','content' => 'TransCon
Hi there,
I wile ago I asked help getting i18n working in Cake 1.2.
See post
http://groups.google.com/group/cake-php/browse_thread/thread/889c63d32cfdf69
Thanks to a lot of comments I did get it working. I like to contribute
something back to you all:
The following function in app_model.php wi
Ok, that makes sense.
On Jun 23, 1:05 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On 6/23/07, oleonav <[EMAIL PROTECTED]> wrote:
>
>
>
> > Nevertheless one would expect that Cake should output the right form
> > tag when a validation er
Hi there Tarique,
I have added your suggestion to the edit template and it worked.
Nevertheless one would expect that Cake should output the right form
tag when a validation error is found.
Thanks,
On Jun 22, 2:42 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On 6/22/
I have posted this questions earlier on but no replies so I'll ask you
again;
---
Strange things happen when using multiple validations rules in cake
1.2. in combination with an edit action
When requesting a edit action for example admin/pages/edit/3 - in the
view admin_edit.ctp the helper $form
Strange things happen when using multiple validations rules in cake
1.2. in combination with an edit action
When requesting a edit action for example admin/pages/edit/3 - in the
view admin_edit.ctp the helper $form->create('Page'); does output the
required form tag
Then the magic happens. If va
Hi there,
On Jun 2, 5:41 am, jitka <[EMAIL PROTECTED]> wrote:
> Well, it seems like deadline of your project doesn't allow wait for
> cake's solution for reading records with fallback to default locale ;)
> Ok, I can live with it. So I'll not comment your own solution at all -
> I assume that you
Worked out a solution for;
> The following issues need to be resolved for my project;
> - The ability to fetch default data when the data is not available in
> the database in the requested language. For example a news article is
> not available in French so the English version would be fetched
Thanks jitka,
In the aspect of using Cake to develop sites I'm a beginner. So in
that respect I don't know every method of every class in the api. I
did not have time for that.
>> You get the complete tree with all available translations.
>Sure. What you expected?
Sorry for that, as stated befo
4 languages
This makes 10 X 3 X 4 = 120 !!!
This would not be a good solution to retrieve translations.
...
On Jun 1, 4:23 pm, oleonav <[EMAIL PROTECTED]> wrote:
> Thank you all, I have successfully implemented translations.
>
> The implementation to help other facing the sa
Thank you all, I have successfully implemented translations.
The implementation to help other facing the same situation:
1. Create the i18n tables from the sql file /config/sql/i18n.sql
2. Create the news_articles table
id (int8) prim key, auto incr.
other fields like created_
that field
> that can be accessed in the data like any other hasMany relation, but
> you can also just set the Fields like array('title' ,'abstract',
> 'text'). The field values will then just be set without extra
> relations. Well even with the relations
the given msgid,
> else it wil display the msgid given
> o use __("button_submit", true) to return the value as
> opposed to echoing it
> * you can specify different languages as such:
>
> $this->L10n = new L10n();
> $this->L10n->get('eng
Hi there,
For an upcomming project, a mutilangual site, I need the ability to
store different versions of the same content in a database. I've been
evaluating both Cake & Symfony as basis for this site.
Although I do like Cake for it's low footprint and simplicity to make
things work I need some
38 matches
Mail list logo