Results 1 to 6 of 6

Thread: Operation of pages in Drupal

  1. #1
    Join Date
    Sep 2010
    Posts
    21

    Operation of pages in Drupal

    I'm making a mess to understand how Drupal functions, I'm looking at forums and pages up on the same page of Drupal but do not quite understand how I can handle everything that Drupal provides. So thought that some of you members must know about this. I want to know about the following things :
    • The web, according to what I've read you can create as many pages as you want "page-example1", "page-example2" .. etc and declare them in template Is it so? "As I refer to a page from another? For example: If I create a view (View) having data retrieved from DB with buttons that lead me to other sites.
    • How I can save data in a form (CCK) in table created by me and not on existing tables in drupal (in all forums put that I create a new module but can not get it to work).
    Thank you very much in advance..

  2. #2
    Join Date
    Nov 2008
    Posts
    240

    Re: Operation of pages in Drupal

    I think you have to start a little more "slowly" in this world of Drupal, actually not just Drupal, but of any content management system before using it. Saw that when you make a static page, create a file "page.php" or "page.html" and put inside the content? Well, Drupal is the same, you create a page (or story, or any type of content that you think) ... you put a body, a title, a url, and voila. You have your page-example1 ... and you'll have whatever you want.

  3. #3
    Join Date
    May 2008
    Posts
    248

    Re: Operation of pages in Drupal

    What do you mean to refer? Bind one from another? In the body of page-example1 put a link to page-example2 and presto, you you can put html into the body, and there come into play is where the input formats, and who can use html and who do not (you will not allow anonymous users to put you html on your website, you fill javascript scripts and web kill you, say for example). You can do you a view of all the pages that you want, now, if you want the views displayed buttons ..... difficult it is automatic, and there you have to watch some module documentation views, which create files you can do overrides of fields, and put the html code you want, to use the drupal api to complement data. I did not see what is inside the tutorial, if you just put "Create drupal module" on Google out many pages. In a module, you can trap you in Drupal actions, called hooks, then you will create a hook for the moment at which data is stored in the database (intercept time), and save it to your table. In your case, you would have to use the hook_nodeapi, applying it at the time you make a save on a node created. Anyway, I think at the very bottom ... if you can not use the views module, I doubt you can make your own module, least of all apply a hook.

  4. #4
    Join Date
    Sep 2010
    Posts
    21

    Re: Operation of pages in Drupal

    Thanks for answering, I was watching these days if you can modify the CCK module to store the data for each form in its corresponding table (custom) but there is nothing on the internet and I do not see that method gets data from the form and that line insert the form data. I am now trying to create my module (I have to create a module for each form and that are distinct and input data is stored in different custom tables) and got to add the menu but can not get it when doing Visualize click the menu, that is, for example, the module created is index appears on the menu as to give 'form' appears a blank page as if not what is in formula_form function (). This is my module.form :
    Code:
    form_menu function () { 
    $ Items ['form'] = array ( 
    'Title' => 'form', 
    'Page callback' => 'form', 
    'Access callback' => TRUE, 
    'Access arguments' => array ('content type'), 
    'Type' => MENU_NORMAL_ITEM, // appears in the menu 
    ) 
    $ Items ['menu_mas'] = array ( 
    'Title' => 'Example form', 
    'Page callback' => 'drupal_get_form' 
    'Access callback' => TRUE, 
    'Access arguments' => array ('content type'), 
    'Type' => MENU_NORMAL_ITEM, // appears in the menu 
    ) 
    
    return $ items; 
    } 
    form_page function () { 
    drupal_get_form return ('index_form'); 
    } 
    Index_form function () { 
    $ Form ['form'] = array ( 
    '# Title' => t ('name') 
    '# Type' => 'textfield', 
    '# Description' => t ('Please enter your name'), 
    ) 
    $ Form ['submit'] = array ( 
    '# Type' => 'submit' 
    '# Value' => t ('Submit') 
    ) 
    return $ form; 
    } 
    
    Index_form_submit function ($ form_id, $ form_values) { 
    $ Message = "There have been the '; 
    drupal_set_message (t ('$ Message')); 
    }
    I do not know because I see the form. I guess in the $ form ['submit'] I have to point to another method that is the one responsible for storing the data in the table for you?

  5. #5
    Join Date
    May 2008
    Posts
    255

    Re: Operation of pages in Drupal

    CCK Exitiende and add additional tables and fields related to the node. You must understand that the basis of Drupal is the node and can not avoid everything has to go through. You could have Each content type has its own board but has no sense or logic because it would lose all control over the nodes, would have to make a reprogramming or extend the Core and that's not a good idea. Why not find anything related to that. So that you do that, you try to make keeping in separate tables? If you start by saying that you expect to have results could help.

  6. #6
    Join Date
    Sep 2010
    Posts
    21

    Re: Operation of pages in Drupal

    I know that CCK stores this field in the table node_ ... but I need to be stored in different tables, maybe not be so in Drupal. I tell them that's my project:

    Nothing but depends on the authenticated user to authenticate (whether teacher or student) will appear a view with data from the table for the type of authenticated user, that is, if teachers have a view that displays the contents of the table and Professor if students have a view that displays the contents of the Student table. In the previous view each has a button that takes different forms, the form teacher to teacher and student to student. When form is filled out the form and press submit data should be stored in their corresponding tables (teacher or student). Professor in your session must have a button to view stored data for all students or any student in particular. (The student can fill as many forms as you like, the form is to increase training). For that I have created 2 tables and student teacher have a common id_test a field that represents the rising test identified the teacher. The DB approach is correct or you can do differently in drupal?

Similar Threads

  1. Drupal 6 VS Drupal 7
    By Kindle in forum Polls & Voting
    Replies: 2
    Last Post: 26-03-2011, 02:29 PM
  2. Drupal 5 VS Drupal 6
    By Kindle in forum Polls & Voting
    Replies: 2
    Last Post: 26-03-2011, 02:04 PM
  3. Drupal Users cannot edit simple pages
    By T0tal L0$$ in forum Windows Software
    Replies: 4
    Last Post: 30-01-2010, 10:53 AM
  4. How do i add pages to existing pages in iweb
    By Samsher in forum Software Development
    Replies: 3
    Last Post: 04-05-2009, 10:18 AM
  5. What is Drupal
    By Ninad23 in forum Guides & Tutorials
    Replies: 4
    Last Post: 05-02-2009, 09:31 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,259,682.99241 seconds with 17 queries