-
Posts
10 -
Joined
-
Last visited
Posts posted by beto
-
-
@kixe:
Sorry, I mistyped my "quote code". The $existente variable is actually $current_user.
This is my real code/problem:
Quote$current_user = $users->get(3085);
$current_user->setOutputFormatting(false);
$current_user->galerias->add(2075) ;
$current_user->save();It does NOT add the page to my "galerias" pagetype field.
-
I can't add a new value to a custom PageArray field for my user.
Quote$current_user = $users->get(3085); $current_user->setOutputFormatting(false); $current_user->galerias->add('2075') ; $current_user->save();
However, when I create a new user, I CAN add the new PageArray value:
Quote$new_user = new User(); $new_user->name = 'user_2017'; $new_user->galerias->add('2075'); $new_user->save():
I need help. Thank you very much.
-
Hi all,
I have a blog setup in PW like this
/blog/
cat1/
article1
article2
cat2/
article3
article4
Here is what I want.
I want to have all articles at the URL
/blog/article/
instead of
/blog/cat/article/
Joshua, couldn't you have resolved this using segments?
-
Can't live without Dreamweaver. (I need visuals... )
- 2
-
Thanks Ryan. I am still a newbie to ProcessWire, and developing my first websites with it.
I would really like to take a look at the file structures from different developers.
Anyone would like to share file structures?
-
I wonder how different people handles different "file structures" for templates.
I know that you can only put php code inside a template files, and i have thought that when you have to create a lot of unique "pages" with different php code it will take time to create a template file for each page.
Not only that, but eventually, if you create a lot of templates, the templates folder would get very crowded. I was looking for a better way to organize my php files and found this solution. Instead of creating a template for each unique page with custom php code, I just create a single template named "include". This template just has two fields: title and include_path.
The code of this template is just: <?php include $page->include_path; ?>
In the "include_path" field I set the relative path for including other php files, and this method gives me a more organized collection of php files nested in various folders.
For example, for a form called "reservation", I would just create a page with the template "include", and the field "include_path" set to "./php/forms/reservation.php".
An example of this file structure:
site/
--templates/
-----/styles
-----/scripts
-----/php
--------/forms
--------/processes
--------/catalogs
--------/galleries
-----head.inc
-----foot.inc
-----home.php
-----blog-post.php
-----include.php
Do anyone know if there is a better way to handle php files? o anybody would share their file structure approach?
- 1
-
Congratulations Ryan, you really do very cool work. Your new Form Buider looks fantastic.
Anyway I will wait for the Form Builder to save entries to pages.
Right now the builder is a great way to save information, but when the builder saves info to pages, then we'll have a very powerful tool to develop web applications.
Cheers.
-
For those of us on the west side of the Atlantic; I could help to organize a meeting/conference in Cancún. I give social media and SEO courses there 5 times a year, so I know the place and I am very enthusiastic about it. Don't you like caribbean beaches?
- 2
-
Hello, I am new to this intriguing dimension called ProcessWire.
I am doing my first steps, but I also get this message:
Unable to move uploaded file to: /var/www/vhosts/showled.tv/httpdocs/site/assets/files/5874/20110707_164442-1.jpg
I am running the site in Windows-Apache-PHP5.3
Any help?
- 1
How to redirect www to non www?
in Dev Talk
Posted
Thanks @teppo. For me SEO is everything. So I will use the non-www version.