DNN share module content from different templates - templates

I installed a DNN skin which comes with several templates. Now these templates share the same footer for example: contact us, gallery, about us etc. . .
Is there a way where I can make these modules all share the same content using different templates? I am importing about 7 templates in the website but when I can the content of one of the footers the others content is not changed. Any Ideas on how I can link these together so in the future when I need to change something all of them follows?

You can share content across pages in DNN using the "Display On All Pages" setting in the module settings.
1) Install a module into the Footer on ONE page.
2) Configure the Module Settings for that module to "Display On All Pages"
3) Done
Any changes made to the module, should reflect across all pages. It won't matter which page you make the change on either.
Note: Modules that are set to display on all pages will attempt to load in a PANE of the same name, so if your "layouts" all have a FooterPane, the module will appear there. If you have any layouts that don't have a FooterPane, the module will appear in the ContentPane of that page.
Deleting a module from one page is possible through the module Actions.
To remove the module from all pages, you have to go to the Module Settings, and unselect the Display On All Pages option. The module will then remain on THAT page, but not on any other pages.
All the "deleted" modules (after unselecting Display On All Pages) will be in the Admin/Recycle Bin

Related

Customize X-Cart 5 error page

I have a store created on X-Cart, and I want to change/customize the contents of default error/404 page. I am using X-cart 5.3. Any ideas what can be done?
TIA
Ankit, if you want to change the default contents of the error page (not 404) or the maintenance page (this page shows while the store is in rebuilding state), you should look at the public folder of your X-Cart installation.
This folder contains error.html (this page is for admin user), and maintenance.html. Also, public/customer folder contains another error.html (the one that shows to the customers).
Don't modify these files, because they will be overwritten during the upgrade (replacing with the stock ones). Instead, copy them to another folder or create the entire error page from scratch. After that, modify the etc/config.php file to set the correct paths for the error pages like that (replace the <your_dir> part with your folder with the customized pages):
; Error handling options
;
[error_handling]
; Template for error pages
page = "<your_dir>/error.html"
page_customer = "<your_dir>/customer/error.html"
; Template for maintenance pages
maintenance = "<your_dir>/maintenance.html"
Make sure these options are not repeated in the config, if they do - remove the stock ones.
The 404 page is the different case because it is being rendered by the X-Cart templating engine - Twig. There are two ways to edit its content:
You can modify page heading and text labels. Open the X-Cart admin and go to the Store Setup -> Translations page and click on the link with the labels count across the language you want to edit.
Search for "Page not found" label, and click on the globe icon near the trash icon to edit all available translations. That is the heading of the 404 page.
Later on, search for "The requested page could not be found." label and repeat the procedure. This label contains the text of the 404 page.
Please note that any HTML code will be stripped, use the plain text only.
The second option is to modify the template HTML code. You should be accustomed to editing HTML and Twig languages, you should also have the ThemeTweaker addon.
Copy the skins/customer/404.twig file to the skins/theme_tweaker/customer/404.twig and edit it with the text editor.
Rebuild the store at the cache management page afterwards.

joomla component to module

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

Category Item Layout in Joomla using K2 Component

I am new to the K2 component in Joomla, and am having a problem with the category layout grid.
I am using the K2 Content Module to pull items from a specific category. The category layout grid settings call for three columns for the leading, primary and secondary sections. Yet, the display remains in one column.
In fact, the module does not seem to respond to changes in the category layout settings at all, as images remain the same size regardless of setting.
Here are screenshots of both the category and the module page:
I have watched several videos on the issue and searched this site, and I can't figure out what it is that I am doing wrong.
Thanks for reading!
In case caching is enabled on website Clear the cache and see. Also check the menu item created for displaying the category.
The problem is that you don't know what you are actually setting.
Category settings (number of leading, primary... articles and their layout etc., see your first screenshot) do not apply to the K2 Content Module layout at all. That's correct.
Why? Category settings apply only to pages created via Joomla Admin -> Menus. You have to create a menu of item type "K2 Category" and that will create a page where your category settings will be applied. No other page will be affected by your category settings except this one.
K2 Content Module layout can be changed only via CSS and its template that can be found in /modules/mod_k2_content/tmpl/Default/default.php on your server. In the settings of the module itself, there is no layout settings as you can see in your second screenshot.
If you want to modify the K2 Content Module layout, follow these steps:
Make sure you'll override the module's template first. Just copy the
whole "Default" folder including its default.php file into
/templates/your_template/html/mod_k2_content/ and you'll be ready
to go.
Optional step for multiple module templates and layouts - You can rename the "Default" folder name to something different as "news_template". Now, in the module settings, see the "Select sub-template option" - you can choose your newly created one.
In the default.php file, change the HTML as your layout requires.
Change or write your own CSS for the module. You can do it either via k2.css file or your custom template stylesheet.
There is no "click-way" to choose the layout of the K2 Content Module, sorry - this is the only way.
// Update
I didn't notice that this is so old question but it hasn't been answered properly - so finally, this is the answer. The problem is still current, K2 is still widely used and this applies for all Joomla versions from 1.5 to 3.x

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/

Changing Django built in admin style sheet

I wish to change the built in blue colours for the admin pages.
I used Firebug in Mozilla to try and find the colours around different style sheets I found in the Django.1-3 folder, but none seem to come up.
In what directories would I find the .css files for pages that have the header dark blue colour and the light blue table captions colour?
What actions must I take in order for the changes to work(eg. move folder to main project folder)?
https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/#serving-the-admin-files
The admin files live in (django/contrib/admin/static/admin) of the Django distribution.
You have the source. You can change these files.
One common approach is to (1) copy the static admin files to a separate directory that your web server can use, (2) configure your web server to serve these files, and (3) change your settings.py to reflect this new location for your admin media.
https://docs.djangoproject.com/en/1.3/ref/settings/#admin-media-prefix
No template changes are made.
Nothing needs to be moved into your "main project folder" (whatever that might be).