Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by k07n

  1. Hello Soma,

    Thanks for your reply.

    I was wondering the same about the file size. Anyways, I guess it's better to wait for the latest cheatsheets to be released so that I can update the one I've.

    I'll be sharing doc file this time. 

    maybe i'm wrong, but the only text in pdf is the word "cheatsheet" and all other is hi-res bmp. if you don't mind, you can send me your source and i'll try to convert it.
    ps: sorry for my English, as always =)
  2. Am thinking again at what Diogo said. Maybe an issue with creating your own users rather than using the default ones would be you would lose all the valuable session stuff?

    Can you tell us your case and what exactly you want from users? Maybe someone will give an advice how to organise this?

  3. Hi apeisa, thanks for such a quick reply! :)

    So I don't have to include the templates "articles.php", "images.php" and so on.. in the code? 

    Oh, and can you please tell me what the "render" in the code does?

    Each type of articles must have it's own template. "Render" makes output depending on different templates.

  4. After saving the page with template "custom_user" - new user will be created with name==page name.

    I don't test it. And I wonder what I'm doing at all in the conversation of people with 700+ posts =))

    public function createTheUser($event) {
            if($this->page->template == 'custom_user'){
                 $newusername = $this->page->name;
                 $newuser = $users->add($newusername);
                 $newuser->pass = 'some password';
    • Like 1
  5. I'll ask here, think my question is similar.

    I want to add ID to pages's name in 1 template (exactly like on this forum "/3276-change-auto-bla-bla-etc/").

    So I need to write a module with hooks for this or what? Please, push me to the right direction.


    made it this way:

    class PrefixToPagename extends WireData implements Module {
         * getModuleInfo is a module required by all modules to tell ProcessWire about them
         * @return array
        public static function getModuleInfo() {
            return array(
                'title' => 'Add prefix (id) to the page name',
                'version' => 100,
                'summary' => 'Add prefix (id) to the page name',
                'href' => '',
                'singular' => true,
                'autoload' => true,
         * Initialize the module
         * ProcessWire calls this when the module is loaded. For 'autoload' modules, this will be called
         * when ProcessWire's API is ready. As a result, this is a good place to attach hooks.
        public function init() {
            // add a hook before the $pages->save, to add prefix if needed
            $this->pages->addHookBefore('save', $this, 'addPrefix');
         * Hooks into the pages->save method and sorts pages with a certain template based on certain criteria
        public function addPrefix($event) {
            $page = $event->arguments[0];
            // Only run if the page we just saved has the "vacancy" template
            if ($page->template == 'vacancy') {
    			$oldname = explode ('-', $page->name);
    			if ($oldname[0] != $page->id){
    				$page->name = $page->id . '-' . $page->name;

    thanks guys from this thread.

    • Like 1
  6. Hover works too, but most of the time I'm fighting with the mouse to get a tooltip ;)


    function listChild(child) {
    	.attr('title', child.path)

    change to something like:

    .attr('title', child.path + ' id' + child.id)

    it will show ID on tooltip.

    And the question =)

    How made this not by hacking "core"?

  7. Hi!

    Read all thread, but can't solve my problem.

    My structure:


    -- About

    -- Something Else

    -- Want it in menu1



    ---- ..more of them..

    -- Want it in menu2



    ---- ..more of them2..

    What is the easiest way to render only "Want it in menu 1|2" and their children?

    I think of excluding all others pages, but pages can grow. How can I just point only 2 of pages to render?

    Sorry for my English. Hope you understand what I mean.


    If only be that you can specify multiple parents.

  8. Hi!

    Ctrl+S saves the page but also opens the browser's "save dialog".

    Is it normal, just as ctrl+f4 and other standard shortcuts, or am I doing something wrong?

    Actually Ctrl+S is one of several of the little MODX features that I'm miss so much.
    upd: w7, chrome, FF. PW 2.3
  • Create New...