joomla component to module - templates

I want to convert component to module apart from using plugin is ther any process to handle it.
(or)
whether we should code somethimg to make my mvc component to module .
(or)
is there any possibility to make my component to be placed at desired module position in my template
Regards,
noble

You can't convert a component to a module. A component, module and plugin are all 3 different things. Obviously if your component was something like a simple upload form, then this could be turned into a module but I doubt very much it is.
Nor can you place the component in a module position.
Judging by what you're asking, I am assuming that this is your own custom component, in which case, you should have had a little think and done a little research before you made it and brainstormed your exact requirements.

1st thing You can't convert a component to a module. You have to understand the difference between them
Components are the largest and most complex extensions of them all; they can be seen as mini-applications. Most components have two parts: a site part and an administrator part. Every time a Joomla page loads, one component is called to render the main page body. For example, Content (com_content) is the component which handles the display of content; users can view at the frontend of your site and, as an administrator, you can edit the content. Components are the major portion of your page because a component is driven by a menu item and every menu item runs a component.
Examples: Content (com_content), Banners (com_banners), Contact (com_contact), News Feeds (com_newsfeeds) and Web Links (com_weblinks)
Modules are more lightweight and flexible extensions used for page rendering. These modules are mostly known as the “boxes” that are arranged around a component, for example: the login module. The footer is a module. Modules are assigned per menu item. So, you can decide to show or hide the logon module depending on which menu item the user is viewing. Sometimes modules are linked to components such as the “latest news” module which links to the com_content and displays links to the newest content items. However, modules do not need to be linked to components, as a matter of fact they don't even need to be linked to anything and can be just static HTML or text.
Examples: Banners (mod_banners), Menus (mod_menu), Who's Online (mod_whosonline)
Read more

If you are using Joomla 1.5 then please refer this plugin it does exactly what you want. http://extensions.joomla.org/extensions/2723/details

Related

Sitecore 8.1 Header and Footer Composite Component

In Sitecore I have created base Template & Renderings for "Header, Top Menu, Logo, Search ,Login Button…etc that comes in Header across all Pages of the Site."
Also the same template & Rendering is using in other website so we can't set value in Standard field.
Now the problem is “suppose we have 100 pages in a Site then each page we have to go and add/update rendering & data source.
Is there any way that a “Header rendering” contains child rendering and by placing “Header rendering” render all its child renderings.
Header Composite Component ===>
Logo Component
Top Navigation Component
Search Component
There is a composite component module on the Sitecore Marketplace :https://marketplace.sitecore.net/Modules/C/Composite_components.aspx?sc_lang=en
This fill's your requirements exactly.
It works by creating a "Composite Component" item, then you add your renderings for your header to that component. E.g. Logo, Navigation etc...
Then in the standard values of your page templates, you add a new Composite Component rendering and set the datasource to the component item you created.
The module will then inject the renderings from the component item presentation into your current item. So you only have to update a single place to update all pages etc...
I have this running in a few production sites and it works well. It even supports the Experience Editor.
I don't think there's a solution out of the box. SxA solves this with Partial and Page Designs at site level. Just wrote a blog about it:
http://reinoudvandalen.nl/blog/sitecore-experience-accelerator-partial-designs-and-page-designs/
I also made something that might help you: Partial Layout Presets
http://reinoudvandalen.nl/blog/sitecore-partial-layout-presets/
It even allows you to store presets per site, but keep in mind that it injects composed layouts. If you modify the preset then it does not get applied to the pages where it was injected (though you might be able to pull something of with a shared datasource per site).
Lastly the obvious solution would be to create a page template per site so you'll be able to have standard values per site.
You may want to take a look at using Placeholder Fallback.
This will allow you to add components and renderings to a top level page and then the child pages would "fallback" to using the renderings inserted into the placeholder of the top level page in the item hierarchy. The editors can also insert page specific renderings on each child page if required.
If you do not want to custom code and only out of the box features then you could use Devices. You can find more information in the documentation about Set up a device layout. Once the device is created you can specify a different default device per site:
Now when you open the Presentation Details on the __Standard Values of your templates you can specify a different Layout or Renderings per device, i.e. different ones for AltSiteDevice

How to call the testimonial component into a custom module in joomla 2.5?

I am using one page website, i want shown all requirements in a one page.. Now all requirements are done except the Testimonial component part. I am using RSMonials Testimonial component. This component i want to show in the frond page, i used the its support Scroller module, static modules. But its not depends on client requirement.So i want to call the testimonial component into a custom module.. I am already searched i did not get it proper code.. So could you please help me.. Really appreciate you.
There are some Joomla extensions that allow you to publish a component as a module so you could display the RSMonials Component in a module position and include it in your one page website. For example:
Components Anywhere (free): http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/embed-a-include/25776
Component Loader Module (paid): http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/embed-a-include/21157
Modulix Component to Module (paid): http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/embed-a-include/18121
In the case of Components Anywhere you'll need to add appropriate plug-in syntax into a Custom HTML module or similar.

Multiple item templates in Grid App

I'm developing a Windows Store application based on the Grid application template. Upon creating a new project, there is some sample data generated for the application. There are only three pages in the app: home, grouped items, and item details.
I'm wondering whether it's possible to have different templates for item details, and if so, how.
For instance, I have a group containing a list of smartphones and another group containing a list of printers. In the smartphones item details template, I'd probably have fields such as "Memory card", "Speakerphone", and "Operating system", whereas in the printers item details template I'd have fields such as "Speed", "Accepted cartridges", and "Paper sizes".
How should I go about adding item detail templates and using the correct one depending on which item is viewed? I've looked at http://babaandthepigman.wordpress.com/2012/02/08/datatemplateselector-winrt/ but that seems to be for XAML applications only. I'm not using XAML/VB/C++/C#, but JavaScript and HTML5.
To be clear the three pages in the grid project template are groupedItems (the "hub"), groupDetail (the "section"), and itemDetail (the "detail"). I actually wish they would have named those pages "hub", "section", and "detail".
If you're talking about having multiple item templates so that item tiles on the hub (groupedItems) page look different depending on the item type, then the easiest way is to provide the multiple item templates (WinJS.Binding.Template) in the HTML and then write a custom template selection function. It's not that difficult. You can see an example if you look at my codeSHOW app (codeshow.codeplex.com)... see the home.js page. The source is online, so you can see that page here.
If you're talking about having multiple detail (itemDetail) pages so that when a user clicks on a certain item from the hub, they might be taken to a whole page of information about a phone versus a printer, then that's simply a matter of having multiple pages and being intelligent about which page you navigate to. If the user clicks on a phone from the hub, then you navigate to /pages/phone/phone.html. If they click on a printer then you navigate to /pages/printer/printer.html.
Finally, if your entities (i.e. phones and printers) are similar enough, then you may want to keep a single page to represent them, and just make that page smart enough to modify its template for the right item. In that case, you can create two templates on the page (WinJS.Binding.Template again) and when the entity is passed in to the page (the 'options' part of ready(element,options)), you just inspect it and look at the entity type (i.e. phone or printer) and then render the data into the right template. The Binding and Templating and Fragments and Pages demos on codeSHOW may be helpful there.
If you want more help, you can schedule some 1 on 1 time with a Microsoft Developer Evangelist at usdpe.ohours.org. Have fun!

Opencart module development - Inject javascript/html code in some pages

I'm a beginner on Opencart and just started developing a module for Opencart which it must inject some lines of javascript and html code in these pages:
- Cart Page
- Product Page
- Confirmation Order Page
- Register form page
The official documentation doesn't have informations about how can i do that, I've tried to find a good documentation about OpenCart but I didn't find anything.
I need help. How can I do that?
Diggin necro topics;) :
The easiest way i think:
upload/catalog/view/theme/[themename]/template/product/product.tpl - here you can add your custom html for product page
[your theme name, you shouldnt overwrite default theme because it can cause damage after update]
It depends on where you're trying to insert the HTML/JavaScript.
Doing things the proper way in OpenCart, you're limited to the column-left, column-right, content-top, and content-bottom positions.
The files you'll need to create are:
admin/controller/module/mymodule.php
admin/language/english/module/mymodule.php
admin/view/template/module/mymodule.tpl
catalog/controller/module/mymodule.php
catalog/language/module/mymodule.php
catalog/view/theme/default/module/mymodule.php
To learn how to do this the first time, it's easiest to replicate an existing stock OpenCart module (preferably a simple one, such as information). Once you've replicated it you'll need to go through each of those files and replace any references to "information" with "mymodule".
After that, if you've done it properly, you should be able to navigate to Admin > Extensions > Modules and see your module in there. Then install it, use the "Add module" button to position the module on all the relevant layouts, hit save and hey presto you have a working module on the front-end.
To modify the front-end output, just edit catalog/view/theme/default/module/mymodule.php
If you want to insert your HTML somewhere other than the 4 available positions OpenCart gives you, position your module in the content-bottom position and use JavaScript/jQuery to inject some HTML where you want.
If this is for your own personal website then as Pawel S suggested it would be easiest to simply modify the relevant view files (ie. catalog/view/theme/[themename]/template/product/product.tpl), however if you're making a module which you plan to distribute then this should be a last resort.
Hope that helps!
I realize this is probably long dead by now, but if you're creating a module that needs to modify existing controllers, languages, models or views the correct tool to use is vQMod.
vQMod allows you to modify existing code on the fly using XML.
https://code.google.com/p/vqmod/

Joomla module display

I want to create a page in Joomla that displays only one specified module on a page and nothing more. I was trying to insert module in an article but it's not working because plugins are also adding content to an article, and I don't want to turn them off. MAybe I should create a template with a new position, and override default template on that specific page but maybe there's a better solution. Any ideas?
Joomla is coded to either expect an article or the output of a component on every page. I don't completely understand why you can't just insert a blank article with the {loadposition module_position} code unless your plugins are automatically generating content for articles. I'm used to plugins that only work when their plugin code is added to an article. Anyway, assuming that your plugins are automatically adding content to your Joomla articles, then the simple solution might be to add a new component like Zoo and use the "Pages" app to create a blank/no-title item that contains the {loadposition xx} code, then link your menu item to that Zoo item.
Have you checked the parameters of the article? Those should allow you to turn off the title, author, icons, date, and other elements that may be appearing.
I think it can be possible by this condition in index.php
countModules('condition')) { ?>
do something
do something else
you can put what you want in this module and according to this condtion you have to only insert module name in countModules('your module Name') followed by bhe code in the braces. and for rest of pages you can put your code in the else part.