Jump to content

Affichage d'une page au choix


Recommended Posts

Bonjour,

je me demande si j'ai commit une erreur lors  la programmation de mon module, enfete, mon problème c'est que je spécifie le .tpl a afficher à mon adminmodulecontroller alors que cele ne s'affiche pas, j'ai vu presque tous les tutoriels qui existent, mais en vain.

post-985269-0-41380200-1429696172_thumb.jpg
post-985269-0-41380200-1429696172_thumb.jpg
voici le script de mon .tpl 
 

{extends file="helpers/options/options.tpl"}
<h1>
	je teste que l'affichage
</h1>
			

voici le script du  contrôleur 
 

<?php

class AdminZouhair2Controller extends ModuleAdminController {
	

		public function __construct() {
			$this->bootstrap = true;
			$this->table = 'produit';
			$this->className = 'produit';
			//$this->content = 'html';
			parent::__construct();
			$this->context = Context::getContext();
			 $this->setTemplate('content.tpl');
			fwrite(fopen('zouhairhajjilol.txt','w+'),$this->getTemplatePath());
			
		}
		
		
	         public function displayExporthLink($token, $id){
				$tpl = $this->createTemplate('list_action_export.tpl');
				$tpl->assign(array(
						'href' => self::$currentIndex.'&token='.$this->token.'&
                        '.$this->identifier.'='.$id.'&export'.$this->table.'=1',
						'action' => $this->l('Export')
					));
				return $tpl->fetch();
			}
		
		/*
	public function renderList(){
		$this->addRowAction('delete');
		$this->addRowAction('details');
		
		// cette partit permet juste d'afficher les comumn 
		// Building the list of records stored within the "test" table
        $this->fields_list = array(
			'id_produit' => array(
                'title' => $this->l('Identifiant'),
                'align' => 'auto',
                'width' => 25
            ),
            'designation' => array(
                'title' => $this->l('Designation'),
                'width' => 'auto'
            ),
			'stock' => array(
                'title' => $this->l('Stock'),
                'width' => 'auto'
            ),
			'datedernvte' => array(
                'title' => $this->l('Date der vente'),
                'width' => 'auto'
            ),
			'contenance' => array(
                'title' => $this->l('Contenance'),
                'width' => 'auto'
            ),
			'code_contenance' => array(
                'title' => $this->l('Code contenance'),
                'width' => 'auto'
            ),
			'prixvente' => array(
                'title' => $this->l('Prix'),
                'width' => 'auto'
            ),
			'datecreate' => array(
                'title' => $this->l('Date Création'),
                'width' => 'auto'
            ),
			'datedrnmodif' => array(
                'title' => $this->l('Date derniere modification'),
                'width' => 'auto'
            )
			
        );
		
  
        // This adds a multiple deletion button
        $this->bulk_actions = array(
            'delete' => array(
                'text' => $this->l('Delete selected'),
                'confirm' => $this->l('Delete selected items?')
            )
        );
		
		parent::initToolbar();
		return parent::renderList();	
	}
	*/
	
	
	/*
	// This method generates the Add/Edit form
    public function renderForm()
    {
		
		$this->fields_form = array(
			'tinymce' => true,
			'legend' => array(
				'title' => $this->l('Exemple 1 :'),
				'image' => '../img/admin/cog.gif'
			),
			'input' => array(
				array(
					'type' => 'text',
					'lang' => true,
					'label' => $this->l('Name:'),
					'name' => 'id_produit',
					'size' => 40
				),
				array(
					'type' => 'file',
					'label' => $this->l('Logo:'),
					'name' => 'image',
					'display_image' => true,
					'desc' => $this->l('Upload Example image from your computer')
				),
				array(
					'type' => 'text',
					'label' => $this->l('Designation 2:'),
					'name' => 'designation',
					'readonly' => true,
					'disabled' => true,
					'size' => 40
				)
			),
			'submit' => array(
				'title' => $this->l('Enregistrer 3 :'),
				'class' => 'button'
			)
		);
		
        return parent::renderForm();
    }
*/
	
	
	
	
	
}

merci de bien vouloir m'aider.
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...