Drupal 7 Bartik theme main menu - drupal-7

I am dabbling fresh with Drupal 7 and so far having little success with getting the Menu to behave the way I want it to. My CSS and PHP basics are strong, but understanding Drupal's system is in itself a huge challenge and hence my doubts.
For those acquainted with the Bartik theme, the main menu defaults itself in the header.
I am trying to create a floating/persistent menu that encapsulates the entire width of the website. But I am not sure where I need to go in and make the required changes.
One option I have is to remove the main menu from the Bartik header and then introduce the main menu block in the 'featured' region. Here the menu is rendering itself horizontally instead of vertically the way i want it to be.
Essentially the question is, How do I alter the main menu in the Bartik theme? Where do I need to get in and make changes.OH, and I have sub-themed it, just to let you know.
Thanks much !
Parijat

I'm not sure I follow but it sounds like you need to create a new region to put the menu in. You add these in the themes .info file.
region[region_name] = Region name
Print the regions contents out in your themes page.tpl.php file.
Clear the cache and it will show up in the blocks page.
You can the style it how ever you want.

Related

Superfish Main Menu not filling block vertically

I am using Superfish with the Drupal 7 At Commerce theme (Adaptive Themes).
The main menu is not displaying properly. The menu is only filling the upper half of the Main Menu Block as provided by the theme. Also, the menu items are crunched together too closely.
The image shows the menu, at only half its vertical size with menu items crunched together.
I have used this theme with superfish before and never had to do any special styling.
I think I am missing something or have not configured something correctly.
I appreciate any help.
Jack
I found the problem. It is in the theme/sub-theme. It turns out that the minor version of the theme and sub-theme must match. I reinstalled both and the problem went away.

Menus in certian sections

I am taking over a site and need to break up the navigation onto smaller menus for a particular section. Can someone point me to a tutorial, reference, or blog that can show me how to assign menus to sections of the site?
For example:
When you go to mysite.org/divisions it shows the main sidebar navigation 'Navigation' but when you click a link to mysite.org/divisions/spinal-cord-injury-program, the main sidebar navigation is replaced with a different menu 'Spinal Cord Injury Program'. Then anything inside this section '/divisions/spinal-cord-injury-program/....' uses that new menu.
Thanks, still kinda new to all this.
if you are searching for a documentation then see this documentation, it may help you.
And you need to see the block documentation too for assigning these menu.

ExtJs - page design with common header and footer section

I am currently using ExtJs 4.2 for developing my web pages. I would like to know whether we can define a template and can reuse the template across the pages..To be little more clear, the page header and footer remains the same across pages and only body component changes.
I mean something similar to tiles in jsp.
My scenario is like this:
I have defined a border layout in which the region="north" contains the header part, region ="south" contains the footer part and region="west" and region="center" have the body content.
All my pages have a similar layout...ie..the content at west/center is only changing across pages...so do we have solution to simplify this without defining the entire layout in all the pages...
Please let me know if further clarifications are required
~Ragesh Ak
I think you will want to use Ext.define, and extend the viewport component, giving it a border layout. See the ExtJS tutorial on creating custom components for how to do that. You will want to give it a border layout, and have static panels/containers/menus/toolbars for you north and south objects.
How you model your content/center and navigation/west components depends on the style of application you are building. If you are following the single page application concept with the Model/Store/View/Controller pattern that ExtJS gives you using Ext.app.Application, then you will want to drop empty containers in those slots since you can't swap out a border layout component. Putting in empty containers will allow you to call the removeAll function and then add your new items when changing views. If you are building a regular site that reloads the page whenever you move between views, you can extend the viewport that you created, and put your content directly into the viewport since it won't ever need to change.
Use define to configure a class that extends container and has the border layout you just described, so you can reuse this new class as you need.

Customize login block in Omega theme (Drupal 7)

I'm trying to customize Omega theme in Drupal 7.
I want to customize user-login-block, to render this block in "User Bar Second" region; I'm able to move the block in that region, but I want to display the element horizontally.
I have read to create a function named MYTHEME_theme in template.php and create a template file in templates directory named user-login-block.tpl.php.
I have follewed various tutorial and example in internet, but I can't write a php code to fullfilment my needs.
Thanks in advance, Mauro
if u wanna display the login form horizontally there is no need of writing any new function .. just change the template rendering and so some css changes

ExtsJs4 switch panels

In ExtJs4 Layout Examples how do they switch right panel content when user clicks on menu items? Are there any examples with code samples?
I want exactly the same feature.
They create content panel with layout 'cards', add all examples as individual panels in to it, and then make them visible when you click through them. Check the source code - it's pretty obvious.

Resources