First to show you the effect of the picture:
Directory:
This is in the form of a corethink module, just to install the access
Index.php?s=/test/index
1. Build the module catalogue, write the overall document of the module
OPENCMF. Php
<?php return
Array (
//module Info
' info ' => array (
' name ' => ' Test ',
' title ' => ' Test
'), ' Icon ' => ' FA fa-newspaper-o ',
' icon_color ' => ' #9933FF ',
' description ' => ' Test ',
' developer ' = > ' Pangpython ',
' website ' => ' http://blog.csdn.net/u012995856/',
' version ' => ' 1.3.0 ',
' Dependences ' => Array (
' Admin ' => ' 1.3.0 ',
)
),
//User Center navigation
' User_nav ' => Array (
),
//module configuration
' config ' => array (
),
//Background menu and Permissions node configuration
' Admin_menu ' => Array (
' 1 ' => Array (
' id ' => ' 1 ',
' pid ' => ' 0 ',
' title ' => ' Test ',
' icon ' => ' FA fa-newspaper-o ' ,
),
' 2 ' => array (
' pid ' => ' 1 ', '
title ' => ' Content management ',
' icon ' => ' FA Fa-folder-open-o ',
),
)
);
2. Write Controller
Indexcontroller
<?php
namespace Test\controller;
Use Think\controller;
Use Home\controller\homecontroller;
/**
*
*
/class Indexcontroller extends homecontroller{public
function Index ()
{
$this- >display ();
}
Public Function MyData ($keyword) {
if ($keyword ==11) {
echo ' [' Pangpython ', ' HelloWorld '] ';
} else{
echo ' [ActionScript],
' AppleScript ',
' Asp ',
' BASIC ',
' C ', ' C
+ +
', ' Clojure ",
COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp,"
"Perl,"
"PHP,"
"Python,"
"Ruby,"
"Scala,"
"Scheme"] ';}}}
3. Write the front desk file
Index.html
The above is a small series to introduce the implementation of Baidu based on jQueryUI and Corethink search hint function, to achieve a simulated background data login effect, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!