Answers for "cakephp 2 with customize link"

PHP
6

cakephp 2 with customize link

Router::url('/', true) . 'img/example.png' (cakephp 2)
  
// localhost/domain/event/detail
$current_url = $this->request->here();
// => /domain/event/detail
Posted by: Guest on October-13-2020
2

cakephp 2 with customize link

// In mysql you can order by specific field values, by using ORDER BY FIELD:
SELECT * FROM city 
WHERE id IN (10, 1, 2)
ORDER BY FIELD(id, 10, 1, 2) DESC;

// output:
// order: first those with id = 10, those with id = 1, those with id = 2
// Do in cake
	'order' => array(
		'FIELD(City.id, 10, 1, 2)',
	),

// or
    'order' => array(
		'FIELD(City.id, 10, 1, 2) DESC',
	),
Posted by: Guest on December-14-2020
1

cakephp 2 with customize link

echo $this->Html->link(__('<i class="fas fa-icons"></i>'), array(
  'plugin' => 'building', 
  'controller' => 'service_icons', 
  'action' => 'index', 
  '?building_post_id=' . $buildingPost['BuildingPost']['id']), array('class' => 'btn btn-info btn-xs', 'escape' => false, 'data-toggle'=>'tooltip', 'title' => __d('building', 'add_service_icon')));


// output
// http://localhost/paragonasia-portal/admin/building/service_icons/index/?building_post_id=16
Posted by: Guest on April-27-2021
1

cakephp 2 with customize link

//chnage the layout in Cakephp 4 with the layout file called ajax.php
$this->viewBuilder()->setLayout('ajax');
Posted by: Guest on October-26-2020
4

cakephp 2 with customize link

1. Add .htaccess
<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteRule ^$ webroot/ [L]
	RewriteRule (.*) webroot/$1 [L]
</IfModule>

2. Add Permission tmp, Vendor, Webroot
- Window Set permisson
- Linux Set chmod -R 777
Posted by: Guest on November-16-2020
3

cakephp 2 with customize link

Prefix routing is just very difficult to understand
Posted by: Guest on September-25-2020
2

cakephp 2 with customize link

// output, if you wanna get output same below array, you need to use name="Member[verify_code]" 
// name="Member[email]"  in form

Array(
    [Member] => Array   (
      [verify_code] => 123466
      [email] => [email protected]
      [lang] => zho
      [password] => 123
      [confirm_password] => 123
) )
  
  // cake php form
  <?=$this->Form->create('Member', array('role' => 'form')); ?>
  <fieldset>
  <?=$this->Form->input('lang', array('type' => 'hidden', 'value' => $lang, 'required'));?>

  <div class="form-group">
  <input type="hidden" name="Member[verify_code]" value="<?= isset($verify_code) && !empty($verify_code) ? $verify_code : ''; ?>" />
  </div>

  <div class="form-group">
  <input type="hidden" name="Member[email]" value="<?= isset($email) && !empty($email) ? $email : ''; ?>" />
  </div>

  <div class="form-group">
  <?=$this->Form->input('password', array('class' => 'form-control', 'placeholder' => __d('frontend', 'new_password'), 'label' => '', 'required')); ?>
  </div>
  </fieldset>
  <?=$this->Form->end(); ?>
Posted by: Guest on January-22-2021

Browse Popular Code Answers by Language