Joomla! 3.2 - Add a Global Parameter to "New Menu Item" - php

I am busy trying to customize Joomla's Menu Parameters so that in the administrator area when you create a new menu item, You have an additional option of "1 Column" or "2 Column", And this has to be both accessible by the index file of the template and also Joomla! Update Friendly..
And this is basically just to give the user the freedom of selecting the layout style of a particular page.
What Would be the Best way to go about this?
Any Help Greatly Appreciated.
UPDATE
what i am trying to achieve is similar to when you select a category for a menu item in Joomla!, I want to append it to the url exactly like a category, so you select 1 of 2 columns when creating a menu item and then in the url it should say: &col=1 or &col=2.

Joomla already has a built in parameter for selecting the layout used for a menu item which is the concept of an alternative menu layout. You add the layout to your template html folder with the appropriate xml file. Then that layout will show up in the list of menu options when you select a menu type.

I have two simple solutions without core haking and that are update friendly.
SOLUTION 1 :
Make 2 different templates with the 2 different layouts call them 1 column and 2 columns. When you make your menu link you can choose between them (Template style dropdown).
SOLUTION 2 :
(the one I would recomend)
In your css file make your 2 different layouts based on 2 different css Classes. For example class="1_column" and class="2_columns".
When you make your menu link , under "page display options" you can choose a class for the page it links to. And there you are you can choose between your two layouts.
Hope this helps!

Related

Multiple choice menu

I'm having trouble creating a menu with multiple choices and I'm hoping this great forum can help.
The webpage in question is:
http://rrg.genesis-unlimited.com/solutions/?categories=Adventure%20Park&level=1&format=video
The site is being built in wordpress using the catalyst theme framework which is very similar to Genesis.
I'm using the "views" plugin to create multiple areas.
First you have your main section where you choose the main category, in this case:
Adventure Park
Arborist / Tree Climbing
etc..
there are 7 main categories.
Then there are 3 subcategories: "Beginner, Intermediate, advanced"
Each category / sub-category choice has it's own page.
For instance "Adventure Park - Beginner" has a different page than "Adventure Park - intermediate" and so does "Arborist / Tree Climbing - Beginner".
The content of each page will also have 3 sections for video, articles and FAQ's.
There are basically 28 pages in all with each one having it's own content. This is a big undertaking.
My dilemma is that I would like to allow this choice without the use of a drop down menu.
I'd like the user to be able to click on the first level choice and then the second level choice which will be displayed below it.
Here's a screen shot of what I want it to look like, hopefully the visual helps:
http://rrg.genesis-unlimited.com/wp-content/uploads/2014/07/ishot-1.jpg
So you can see where you can click on the top level category and then choose the second level "view".
Anyone have any ideas on how I could accomplish this using wordpress?
Try to search for plugins,if you dont find anyone then if you know css go and change the css file

Social Engine custom page ability to add widgets and changed layout

I want to create a new page like you would see in the admin layout editor. I can create a new page from there but its url is always mysite.com/pages/mypage . If i go into engine4_core_pages i can add a page that references my controller and the action i want. So lets say
mymodule_index_mynewpage Somepage
It will display in the LayoutEditor under Editing dropdown as 'Somepage'. When i select that page to either add widgets to it or change the columns all i get in the middle content area is a top Global Header and Global Footer option to hide or show. There is no open area in the middle when i can place widgets. Screen cap of what im talking about
http://i.imgur.com/rDSy26n.png?1
How can i give the page the ability to change layout and add widgets to it? I cant seem to find it.
Edit: adding to answer below
After following the below directions the ability to change the layout is limited. To be able to use all of the "column layouts" you must also place into engine4_core_content.
(auto number), yourpage_id, type=container, name=middle, (parent containers incremented id), order(6 i guess), ["[]"]=params, null=attribs
1234 50 container middle 1000 6 ["[]"] null
At first, you have to create new row in engine4_core_content with type 'container' and name 'main' (of course page_id there is your page_id). Main container contains 'left', 'right' and 'middle' containers.
Then, in the end of action that refers to your page (mymodule_index_mynewpage), you can use something like this to display content which configured using layout editor for your specific action:
$this->_helper->content
->setContentName(48) // page_id
->setNoRender()
->setEnabled();
return;
There are two tables in socialengine which store information about pages and widgets that are used by layout editor:
engine4_core_pages
engine4_core_content
Both are related by the field "page_id".
You have to take in mind this structure:
page (defined in engine4_core_pages)
|
----- container (defined in engine4_core_content, field: type)
|
----- widgets (defined in engine4_core_content, field: type)
Check info in both tables and in your project check the file install.php (inside of //settings

Joomla article pretty url that's not tied to a menu

I am working in Joomla 1.5 and have an article that I don't want listed in any of my menus. It is a special promotional page that exclusive people will be given the link to. Is there a way to give the article a pretty URL?
Currently the URL that works is /index.php?option=com_content&view=article&id=35. I would like that to be /15k.
Anyone help me?
I have seen this question, but the URL isn't quite what I'm looking for.
To get that URL you will need Joomla!'s SEF/SEO settings turned on (I'm assuming you've already got that setup).
In Joomla you have to create a new menu, call it something like "Utility Menu" but don't give it a "Module Title" - you don't want to display this menu so you don't need the module.
Then create a "Single Article" menu item with the alias 15k as a menu item within the "Utility Menu". You should now be able to access the article at the http://www.yoursite.com/15k
If you want to link to this from another menu create a menu item alias and point it at the 15k menu item. If you want to link from within an article simply point the link to the 15k menu item.
[Edit]
Routing in Joomla! first looks through the user defined paths (i.e. menu's and their menu items) then if it can't find a match for the requested resource that way it asks the particular component to build the route and if the components router is basic (i.e. nearly every single one in Joomla! 1.5) then you get the ?option=com_somecomponent&id=X style result. In 2.5 this is much improved but still uses the same routing mechanism.

how to add different classes to primary links in drupal6?

I am making custom theme in drupal6. I want to assign different css classes to different menu. how can i do this. Please help.
The easiest way would be to use the Menu Attributes module.
From the module's project page:
You should use this module when
You want to "nofollow" certain menu items to sculpt the flow of PageRank through your site
You want to give a menu item an ID so you can easily select it using jQuery
You want to add additional classes or styles to a menu item
The module currently allows you to set the following attributes for each menu item:
Id
Name
Target
Rel
Class Style
Accesskey

Should I write a component or a module? (or both?)

I'm trying to write a slideshow for joomla. Specifically one that will be placed next to an article (no necessarily associated with the article though). Should i write a component, or a module? OR should I write a component that is placed in the page using a module (like the com_banner and mod_banner stuff in the joomla basic installation).
I know I am reinventing the wheel, but I really want to learn about joomla modding.
You want a module. You can assign modules to any menu items.
Modules will appear on that page and "sub-pages". For example, if you assign a module to a menu item that points to a "Article blog layout", then it will appear on that page and the articles linked from it.
If you only want one specific article, or any page without a specific menu item, create a new menu called "hidden menu" and make a menu item in it. Menus don't appear unless you publish the menu module.
By the way, there are many slideshow components for Joomla already out there - Photoslide from gavick.com is pretty good, and free.
If you want to associate the slideshow to a specific article i think you should write a component, because in this way you have more control on the article and you can manage its structure and its layout.

Categories