Comments (14)
There is. You need to code the horizontal dropdown menu by yourself.
Basically, there are $cms['navigations'] and $cms['navigation_path'], which you can access from theme's view (e.g: themes/neutral/views/layouts/default.php)
Those two variables are used to build menu. In the default scenario, In the already exists scenario, I use build_menu function that can be found at theme/neutral/lib/function.php
What you need to do is either make a new function or edit the existing one to generate a drop down menu. Below is the example of $cms['navigations'] and $cms['navigation_path']:
$cms['navigations']:
array(10) {
[0]=>
array(10) {
["navigation_id"]=>
string(2) "16"
["navigation_name"]=>
string(10) "main_index"
["title"]=>
string(4) "Home"
["description"]=>
string(30) "There is no place like home :D"
["url"]=>
string(10) "main/index"
["is_static"]=>
string(1) "0"
["active"]=>
string(1) "1"
["child"]=>
array(0) {
}
["allowed"]=>
string(1) "1"
["have_allowed_children"]=>
bool(false)
},
......
}
$cms['navigations'] consists of the whole menu structure. You might be interested of "url" key which is the url pointed by the menu. Also, "allowed" value will be "1" if it the menu should be appeared. The "child" key will be consists of sub menus (with the same structure as $cms["navigations"] itself.
$cms['navigation_path']
array(1) {
[0]=>
array(4) {
["navigation_name"]=>
string(10) "main_index"
["title"]=>
string(4) "Home"
["description"]=>
string(30) "There is no place like home :D"
["url"]=>
string(10) "main/index"
}
}
This is the "path" to the menu (e.g: if you browse to "blog | manage blog | manage article", the $cms['navigation_path'] will be consists of 3 elements of array).
You can always perform this script in your theme's view:
<?php
echo '<pre>';
echo var_dump($cms['navigations']);
echo '</pre>';
echo '<pre>';
echo var_dump($cms['navigation_path']);
echo '</pre>';
?>
Please tell me if you have some problem doing this :)
from no-cms.
Thanks for your help. Everything is going well so far but I have one question. Where the variables are created $cms['navigations'] and $cms['navigation_path']:
Or, how to create a new one? Example: $cms['navigations_horizontal']
from no-cms.
Ok, work good ;) Thanks. http://i47.tinypic.com/2hxalfo.png
I also wanted to do two navigations. One horizontal and one vertical. But it's probably working for hours;)
from no-cms.
You don't need to create the new one, what you need is to change how it is presented. So just use $cms['navigations']. There is no need to make $cms['navigations_horizontal'], except you have a good reason for it.
The content of $cms['navigations'] is taken from cms_navigation table.
But if you want to know, you can check application/core/CMS_Controller.php I have view method which is also make $data['cms']['navigations']. This variable is then parsed as $cms['navigations']
from no-cms.
Good work, @Konradinho.
So the dropdown menu is not taken from the database? if it is the case, you can simply modify the theme instead of using two navigation variable.
from no-cms.
The menu is retrieved from the database table cms_navigation. Only changed the css style for "ul" and "li". This is your standard navigation so that in the Polish language :)
from no-cms.
@Konradinho : Oh, I see :) You might also like to check assets/nocms/languages, and make "polish.php". Then you can use wysiwyg editor, and change the language into polish. It is an undocumented feature :p.
from no-cms.
Thanks for your help. I'll still have to modify wysiwyg editor to make it work well. Regards;)
from no-cms.
Hi, seems that your not-working wysiwyg is a serious problem. This is related to my default configuration which make gzip compression by default. You can have a quick-fix by editing application/config/config.php, go to line 318, change this line:
$config['compress_output'] = TRUE;
into this:
$config['compress_output'] = FALSE;
Or you might prefer to download the newest one of No-CMS, since I've already fix it
from no-cms.
You might want to check new themes: https://github.com/goFrendiAsgard/No-CMS/tree/338b726ba39bf00c3650265d798a741170dba634
from no-cms.
Good work, management easier than ever. But I'll save my drop-down menu ;)
from no-cms.
Do you mean thumbnail image of the theme?
I think it is not easy. But let's see,.... :)
from no-cms.
Creating image thumbnails when upload using grocery crud ;) No image theme ;)
from no-cms.
Oh, I see. that sounds reasonable :)
Thank's for your suggestion...
from no-cms.
Related Issues (20)
- suggestion: bootstrap glyph as badge-icon HOT 1
- how to disable third party auth ? HOT 2
- library dropdown
- jquery fancybox HOT 2
- Problem with hosting HOT 1
- Error running NO-CMS on xampp installation HOT 2
- bad Merge from development to master HOT 1
- Translation: Form_submit HOT 2
- Internet Connectivity Setting HOT 2
- How to make admin panel different from frontend
- Slide Image Change in live server HOT 1
- Login not working HOT 3
- Issue on Apache 2.4 authz_mod HOT 1
- How can i use bootstrap version 4 to create my own theme. HOT 3
- Stored XSS in No-CMS HOT 1
- 2nd Stored XSS in No-CMS HOT 1
- XSS Persistent HOT 1
- Another Persistent XSS HOT 2
- sql injection HOT 1
- Dynamic Parameters in database.php
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from no-cms.