Add menu entries for each component view - joomla

How do I create menu entries in joomla component for different views?
Let's say I have a main view which is assignable from Menu Manager and than I have a second view com_my/views/second/ and I want to have as option as well when I call the component from menu manager.

Inside the tmpl directory of each view add an xml file that has the same filename as the layout you want to create the menu for, that looks like this:
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>
For example if the desired layout is named default.php the above would be named default.xml you can find more info here.

Related

Joomla - How can I locate Administrator Module to different page other than main Administrator page?

I am new to Joomla. I have to add an administrator module to the page where a specific module is being edited at administrator side. For example here is the module editing page where I want to add an Administrator module
But there isn't any option for menu assignment in administrator module editing page. It always shows on front administrator page
Here is XML file
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="3.1" client="administrator" method="upgrade">
<name>mod_admincustom</name>
<author>Your Name Goes Here</author>
<creationDate>December 2015</creationDate>
<copyright>Copyright (C) 2015 Your Brand Goes Here</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>email#nomail.com</authorEmail>
<authorUrl>www.yoursite.any</authorUrl>
<version>1.0.0</version>
<description>Custom Module for Administrator</description>
<files>
<filename module="mod_admincustom">mod_admincustom.php</filename>
</files>
</extension>
Can you please specify that what kind of changes can I do to solve my problem. Thanks!
You can only show modules on the front page of admin section (Control Panel).
If you want to show your module on a specific view of a component, you can create a template override for that view and load the module manually.
Another option is cloning the default template of admin, then you can customize the new template and load any modules any where.

Change name of component menu

I'd like to change the name of my component menu item. I took a screenshot, this is the place where i want a different name for my component.
To adding menu item for your custom component you can follow this link to add custom component menu item. Here the link:
http://docs.joomla.org/J2.5:Developing_a_MVC_Component/Adding_a_menu_type_to_the_site_part
In the default.xml file
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE"> <--The title which you defined in component language file will be shown here or Simply you can directly put name in the title-->
<message>
<![CDATA[COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>
Hope this will help you.

Add a magento layout

How to add a layout on magento system? I want to add a new layout which can be selected from administration panel as well.
I am trying to make two layout on the website. One layout with banner and another without banner. Lets say I want
2Columns-right.phtml and 2Column-right-wBanner.phtml
How to add this?
For This you Need to create a custom module.
In Module etc/config.xml copy following code:
<?xml version="1.0"?>
<config>
<global>
<page>
<layouts>
<custom_layout_wbanner>
<label>Custom Layout Banner</label>
<template>page/2Column-right-wBanner.phtml</template>
</custom_layout_wbanner>
</layouts>
</page>
</global>
</config>
Hope This Help !!

How can I add an icon in a SharePoint document library template?

i want to insert a image in a sharepoint document library template.
It should appear when I click Site Settings -> More Options -> in the Library selection.
I tried to manipulate the manifest.xml - File with the ImageUrl-Tag and it didn't help.
Is it possible? I've searched for many days an can't find anything.
THX
You want to add a preview image to a custom SharePoint document library you created, correct?
I'm assuming you have created a list template (specifically a document library template). In the elements.xml of that template you have the Image attribute which represents the preview image.
Here is an example elements.xml for a custom document library:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListTemplate
Name="MyList"
Type="10012"
BaseType="1"
OnQuickLaunch="TRUE"
SecurityBits="11"
Sequence="110"
DisplayName="My List"
Description=""
Hidden="false"
Image="/_layouts/images/itdl.png"
DocumentTemplate="121"/>
</Elements>
The document library will be shown with the image located at /_layouts/images/itdl.png as its preview image. You said you tried settings the ImageUrl attribute - this doesn't exist for a list template, though it would exist when you were creating a web template (see this SO post).

magento how do i create specific home page for specific templates

I have a good design on my website and i suddenly realized my design does not render pretty well in internet explorer 7 and 8, i tried all that i can but i still cannot fix it and i dont like how its displaying in those browsers so i decided to add exception on the design configuration coumn by adding MSIE 7.0 and then value of defaul, tested with internet explorer 7 and it works well but my problem is that my custom theme has some large images and texts and other materials that were aligned nicely with css but once i changed the theme to default and it does not see those css, they also just display anyhow and its really a pain for me, all that i need to do now is find a way to make the default theme load with a different cms page instead of the normal homepage for my main theme. i dont know if i can do that but i need some little help or guide to go about it.
I followed your guide and have created the files and now i can see the welspot template under the design field.
Now i need to still use the old homepage (the one i have installed with the hellowired theme), i want to copy magento default theme into my package now and edit it but i need to find a way to remove all the static blocks i created through maybe a layout file as i wont use those blocks in the default theme and even if possible add different images through xml so i would be using two themes with the same homepage but dynamic content based on the theme being used.
Sure, you can set default home page whatever you create but you should do some things.
First, create config.xml
<!-- path: app/code/local/Welspot/Page/etc/config.xml -->
<?xml version="1.0" encoding="utf-8"?>
<config>
<modules>
<Welspot_Page>
<version>0.1.0</version>
</Welspot_Page>
</modules>
<global>
<page>
<layouts>
<welspot_one_column_cms module="page" translate="label">
<label>Welspot One Column</label>
<template>page/welspot_one_column.phtml</template>
<layout_handle>welspot_one_column_cms</layout_handle>
</welspot_one_column_cms>
</layouts>
</page>
</global>
</config>
Second, create Welspot_Page.xml
<!-- path : /app/etc/modules -->
<?xml version="1.0"?>
<config>
<modules>
<Welspot_Page>
<active>true</active>
<codePool>local</codePool>
</Welspot_Page>
</modules>
</config>
Third, create welspot_one_column.phtml
<!-- path : /app/design/frontend/[your_package]/[your_theme]/template/page -->
<div>Hello World</div>
As you might guess, you should customize welspot_one_column.phtml file.
Finally, go to Admin > CMS > Pages > Home Page > Design Tab select your newly created template (Welspot One Column).

Resources