How to display the “Menu Title” in Joomla 2.5 - joomla

I’m trying to display the menu title text (example “Home”) in the header area of my Joomla 2.5 website.
Joomla’s default (when activated) is to place it in the Component area.
I’m not sure the best way to accomplish this. By default Joomla wraps the menu title with an H1 tag but doesn’t wrap it with a div and class.
The ways I’ve thought might be best to do this are:
Somehow wrap all menu titles with a div and class so I could reposition them up into the header with css .
Add some php code to my template. Something like:
php
$menuTitle = $this->params->get(‘fieldNameOfMenuTitle’);
php
echo = $menuTitle;
Any ideas, suggestions, or answers would greatly appreciated
Thanks

Never found an exact answer but found a work around.
Used a modified version of the below demo/plug-in to create a custom field (named it: "Title that displays on the Web Page") in the articles menu. By default, the table that is created and displayed in the web page is in the component area and is wrapped in a w/ a class. Repositioned the with CSS up into the header/banner area.
http://docs.joomla.org/Adding_custom_fields_to_the_article_component

Related

Why does my MVC component for Joomla 3 have an empty sidebar?

I am changing my Joomla 2.5 component into a Joomla 3 component. However, it turned out to be one big obstacle course with hardly any documentation for it as far as I could find...
In Joomla 3 (using 3.5.1 at time of writing) the originally horizontal submenu goes vertical into the sidebar.
I called JHtmlSidebar::addEntry( "Item", "index.php?option=com_example", false ) to add a submenu item. Then called echo JHtmlSidebar::render() in the view's template file.
I do get a sidebar that can be opened and closed, but there are no items in it...
I downloaded the Hello World example component from https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_an_install-uninstall-update_script_file. It has a sidebar but it's a mess: in its Messages view there is a sidebar with items in it but not the collapsable one and in its Categories view the collapsable one appears empty and over the other sidebar:
It also uses JSubMenuHelper (instead of JHtmlSidebar), which is deprecated...
I then tried to find out how it is done in Joomla's core com_installer, which has a nice collapsable sidebar with submenu items, but did not find more than what I already described above...
Anyone who can tell me how to get a proper sidebar? Thanks a lot already!!
And as it is so often: just after I posted my question I found the answer...
In admin/controller.php I defined a method addSubmenu() in which JHtmlSidebar::addEntry() is called. I called addSubmenu() from the method display(), but I accidentally did that after calling parent::display(), so no entries where added yet when that method was executed.
Now calling addSubmenu() before calling parent::display() and getting a very nice sidebar as result.

Building a native Joomla 3.1 component with refereing com_weblinks component

I'm going to develop joomla 3.1 component.
I have checked lend tutorial. And some people ask us to go through com_weblinks component which is fully written in new MVC style.
Can you please explain img and alt attribute in menu tag and its contents submenu section in weblinks.xml.
And also can you explain link in com_weblinks_categories (option=com_categories&extension=com_weblinks)? How it work? What is the purpose of extension parameter?
<submenu>
<!--
Note that all & must be escaped to & for the file to be valid
XML and be parsed by the installer
-->
<menu link="option=com_weblinks" view="links" img="class:weblinks"
alt="Weblinks/Links">com_weblinks_links</menu>
<menu link="option=com_categories&extension=com_weblinks"
view="categories" img="class:weblinks-cat" alt="Weblinks/Categories">com_weblinks_categories</menu>
</submenu>
And also anyone explain this check condition and parameters and its pattern in controller.php
$this->checkEditId('com_weblinks.edit.weblink', $id)
Thanks a lot
When it comes to articles, banners, weblinks, newsfeed, contacts etc, they use categories. The categories component is not only used for articles but all of the mentioned above. So when you go to view the weblinks, the URL will be option=com_weblinks however when viewing the category, it will use the parent component that's used for it option=com_categories. The child extension is then defined after like so:
option=com_categories&extension=com_weblink
As for the checkEditID function, have a look at this. It's basically a method to check whether or not the ID is in the edit list.
If you look on the Joomla 2.5 menu, you will see small icons on the left hand side of each menu item which I believe img="class:weblinks-cat" is supposed to be used for, however they don't show on Joomla 3.1. I'm not sure why but can always find out why.
Weblinks is most definitely not written in the newest mvc style used by Lendr, if you are coming from 1.5 it is written in the style you should use for 2.5. That style (now known as legacy) also works in J3, but if you extend the base classes you need to rename them.

Changing body color in articles Joomla

How can I change the body bg color to and specific article in Joomla?
We accomplish exactly this for a scientific site by specifying the Page Class Suffix when creating a menu item for the article. It's located on the menu option page under Parameters (System), and whatever string you put in there is appended to the class of the page. From there, your CSS skills and Firebug will be your friend to add your class and make changes in the appropriate CSS files.

Joomla 1.5 / Modification of YooTheme "ZOO" Component

I'll start out by mentioning that there is a developer forum for Zoo and I have used it already. My purpose posting here is that I typically get a thorough answer within minutes or hours at SO, whereas the responses on dev forums can be slow or non-existent due to the smaller population base.
My question regards Yootheme's ZOO 2.3.2. By default, a product "Frontpage" appears to have a "Categories" box rendered on top of the items. If one turns off all the available options in Frontpage/Template configuration (hide Titles, Count, Descriptions, etc.), an empty box still remains on top of the items.
I've been able to manually remove the box in its entirety by addressing the following file:
media/zoo/applications/product/templates/default/frontpage.php, and commenting out lines 84-92:
<!-- <?php
// render categories
if ($this->category->childrenHaveItems()) {
$categoriestitle = $this->application->getParams()->get('content.categories_title');
echo $this->partial('categories', compact('categoriestitle'));
}
?> -->
Seems like there should be a more eloquent way of doing this on the admin backend, but I couldn't find one. Am I missing something or is my solution the best one?
ZOO is designed to easily be able to modify the built in templates to suit your needs. ZOO templates are meant to be overridden much like Joomla uses template overrides. Rather than editing the default template, you simply create a new template that does what you want it to. The default template should not be changed.
Here is the documentation on ZOO templates - http://www.yootheme.com/docs/home/item/create-a-new-template
Rather than edit the file you mention above, you make a new template here -
media/zoo/applications/product/templates/YOUR-TEMPLATE-NAME/frontpage.php
Then do all the changing you want without messing up the default.
There is an easier way: First, you must identify what calls the item called "frontpage". In PURE yootheme at least it is called from "home" in the "mainmenu". So click "home" buton of the mainmenu, then over the right menu "Parameters(Basic)" you just chose "-select aplication-" instead "frontpage" and that's it.The Frontpage and its "box" are now gone. At least it works for me.

Change appearence of page dynamically like twitter or tumblr

I'm trying to find tutorials or code to allow users to customise their page, just like twitter ,wordpress and tumblr do.
Could someone tell me what technology their using?
i'm a .net developer, but maybe they're using jquery?
Any help would be great.
Thanks
You can use javascript to change style sheets and the DOM
Question is a bit broad. To change the page you simply need to manipulate the DOM or change the CSS associated with the page's elements. This can be done any number of ways. E.g. you could write out a new CSS class dynamically, you could add new elements to the DOM itself or you could modify the existing attributes of the page. e.g. to set the background of the page you can do something like:
(assuming JQuery)
$("body").css('background-image','url(path/to/image)');
Hope that helps,
-fs

Resources