Joomla 1.7 with Virtuemart 2.0 – How do I change template for a homepage and other subpages - joomla

I am a newbie to Joomla 1.7 & Virtuemart. I have used many CMS so far and in Joomla I need to do very common task. I need to have different layout for homepage, for product list and product details and so on. Every single page is generated from index.php which is in *joomla root/templates/my_own_template/* folder.
And one more question. Is there any Virtuemart 2.0 or Joomla 1.7 documentation? Because what I could see is that the versions are really different from old ones for which most documentation are written.
Thank you in advance for answers.

You're probably not going to find much documentation yet since that is usually the last thing that a developer does once the code is out and tested.
As for changing templates, you don't necessarily need to change templates to have different layouts. First, VM has several different theme files (theme is a VM template) that render the various pages. There are already different layouts you control in the admin. You can also change a particular page by adding or removing the various modules from pages. You can associate a module with all pages in the site, a selection of pages, an exclusion of pages, and no pages at all. Components like Advanced Module Manager give you even more control over where and when a module displays. A properly coded template will have collapsible module positions. So a page with no modules in the left column will not have a left column.
Lastly, Joomla 1.7 also allows the use of template styles. When you install a template, it creates a default style. You can duplicate and edit that style, then assign it to various menu items to achieve very different looks from one page to another. http://docs.joomla.org/Help16:Extensions_Template_Manager_Styles_Edit

Brent's answer is good – he's right that the look of a page can be determined by which modules are assigned, which VM layout is used, and by assigning different Joomla Templates/Styles to different menu items.
One issue that arises a lot with complex components like VirtueMart is that it can be awkward to assign different templates (or modules) to different menu items. This can mess up your menu structure, and there are times when VM will decide on a different menu item to display something rather than what you thought it should. So that messes up the modules and templates/styles. This is part of the down-side of having a menu-item-driven assignment system.
AMM is good for assigning modules to different pages independent of menu item - as is MetaMod (which has explicit VM support).
For assigning templates/styles to different pages in VM I would suggest Chameleon. Chameleon has form controls for selecting lots of different factors about VM (e.g. all the sub-page types, category of the item, cart contents and more) and you can use any of those factors to trigger a certain template/style. It can also trigger other actions like adding CSS/JS to the page, removing arbitrary menu items, switching the home page, etc.
So ultimately, using Brent's techniques and with Chameleon, MetaMod and/or AMM, you have a huge amount of control about how individual pages in VM look.

Related

Joomla Quickstart advice

Please I need some guidelines (or link of tutorials) in creating Joomla (3 - 3.5) website with the purchased template design. I wonder how professionals with experience are solving my doubts in practice.
Do you recommend the installation of the purchased blank template with a single installation and configuration of modules and components or installation of template with demo examples (Quickstart)? I know the differences but I was wondering how you are doing.
Till now I've almost always used the Quickstart installation.
I wonder if you clone the main menu (and other navigation and modules) and than you rename a copy for your needs and you change the content or you delete all navigation items except Home and than you are re-creating items according to your needs.
I'm not sure if I can copy the main menu or I copy only his necessary items and than delete overage of template.
It happens to me sometimes if I click on some of category it leads me to the main menu from original item, not to the desired custom copy, even though the path is set (the default items). Therefore, I am not sure which is better... copy main menu and items or to delete all navigation and content of the Quickstart installation and form my own navigation, content and modules.
In short, how to sort out all unnecessary items, and those that I am using should I copy and modify, modify existing, or delete all and make my own needed items.
I believe you will know my concerns.
Thank you and regards,
John
I have created several websites in Joomla with blank template and also with quickstart package.
Advantages with Blank Template
You will get the core theme without any unnecessary content and
basic modules and plugins. You dont have to delete any
contents/articles later.
You will be having authority to place modules at your desired positions. To check the modules position at the frontend simply do this http://example.com/?tp=1.
Disadvantage of Blank Template
There are some module style settings embedded in quickstart package that you wont be able to set yourself without going through full documentation. So sometimes your menu seems distorted.
Disadvantage of Quickstart Package
Deleteing unnecessary articles, removing unnecessary modules is a big headache.
Database size unnecessarily increases.
Steps I follow
I create a quickstart package in localhost and create a blank site with blank template in live site. Whatever settings I need I copy from the local website so that I am saved from removing unnecessary contents from live site. Also sometimes deleting some contents give rise to some other issues. Its better t go with a Blank template.

Joomla - Modifying default category list view (through overrides?)

I'm building a site for a friend and I should state that this is not what I'm doing for living. I just started working with Joomla a few days ago.
Everything is good so far, except I'm stuck at one point.
This is a site for a construction company and I need to create articles for on-going and completed projects. I will create an article for each project and each article will belong to a category, 'Completed' and 'On-Going', respectfully.
I plan to create menu links for 'Completed' and 'On-Going' categories in main menu. I also want to present a thumbnail of the article on the category list. Problem is, standard look of the category list is kinda ugly, and I have no idea how to change it. I'm using a template named PixelDot, but it does not seem to do any good for my problem.
During my research, I stumbled upon concepts 'Layout Overrides' and 'Alternative Layouts'. I have basic html and css knowledge, also some PHP, but I am totally lost on which file(s) to modify. I also need a little help on get the entry text picture as a thumbnail on the category list (this is the list where you see 'articles' aka projects which belongs to the category (completed or on-going), when you clicked on relevant menu button)
Any help will be highly appreciated. My Joomla version is 3.4.1. (which I believe most up-to-date version as today)
I'm sometimes making it more complex while I try to make things detailed and clear, I hope this is not one of those cases.
First, I would suggest using tags rather than categories to manage this. Tags are much better suited for temporary labelling or dividing into groups.
Second, go to the template manager, template view for your template.
Go to the create over ride tab and select the view that you want to override (i.e. tagged items).
This will automatically copy all the files to the correct location in your template.
At that point you can play around with the layouts to your heart's content.
Also ... some pieces of the layout you may want to override may not be in the traditional layout but may be in a jlayout. You can do the same thing with them. THis is all documented in the docs.joomla.org site as well as around the web.
I also would do this with Tags. One reason is, assuming you are using SEF URLS, that the projects article pages will have a unique URL. If you move a project's article from "on-going" to "completed" then you may be changing that SEF url. This will cause your search engine ranking for that page to be lost.
I would tag each article "on-going", "completed", etc and then create a menu item to display only that specific tag. The project's article would stay in its original category, that could be my project type, project location, etc; which also will increase the SEO for that given project's article.

Custom data in pyro cms pages, such as images or other data

I'm wondering how in PyroCMS I can add a custom field to a page. Ideally I would like to have an image area at the top of the layout, and have a custom field in pyro that would allow someone to populate that image from the pages module. I realize that there are some image plugins that allow me to attach images to pages, but I would like to be able to add the images directly into the page in the admin (as well as other custom fields for the pages). Even on a separate tab would be fine with me. I'm fine building something if someone can point me in the right direction.
Currently if you want to add a custom field to a page you have to hack the module. This is obviously not ideal and im not really suggesting it, but I had to do it for http://tedco.org/business to add a "Subtitle" field to each page.
2.2/develop is having its Pages and Blogs moved over to Streams, so you can add custom fields to all pages globally, meaning you can add an image in if you like, or append a US State for some reason, or add a slider. Whipee!
So right now: Hack it or wait. 2.2/develop will have your feature in a week or two.
I'm not sure you can do this directly from the pages module yet or not without some customization (possible hacking) though, I just asked and will update if possible.
In the meantime this might be helpful:
Consider looking into PyroStreams. for this though, it will require the Pro version of PyroCMS or you can purchase it from Parse19 directly.
You might find this article helpful about organization and page layouts.
Here is an article called Dynamic Pages with PyroCMS and PyroStreams though, it's a bit outdated now.
You may also make use of the gallery module, which is free though, I'm not sure this will meet your needs.

display custom attributes on Virtuemart browse page

I need the browse page to show quantity box, custom attributes, and Add to Cart button all together.
It doesn't show it at all. Only when you go to the product page, you can see them.
Any solutions?
Thanks, Ahmed.
Ahmed, you'll have to modify the template directly to do something like that. VM uses a large number of template files written in PHP. If you're using the default template, you can find them here:
components/com_virtuemart/themes/default/templates/
From there, it takes a little looking around to figure out exactly which template you need to edit. If you need to edit a browse template, my recommendation is go to your VirtueMart Administration in Joomla backend and look at Admin | Configuration | Site | Layout to get an idea of which files you're using. It will probably say "Default" in the dropdown, with a Configuration link directly below. Click that link and look at the very first item, Product List Style. From the description of your layout desires, you might be using Flat Product List.
The main file for editing that layout is:
components/com_virtuemart/themes/default/templates/browse/includes/browse_listtable.tpl.php
If you're a programmer, you should be able to look thru the code and correctly guess which code elements are being used to display VM product details. If you're not a programmer, you can still fake it by commenting out sections to see what "goes away" on the actual product page. Use what you learn to strip out useful code and move it around.
Another useful file to pull VM product code from is:
components/com_virtuemart/themes/default/templates/product_details/flypage.tpl.php
This is the actual product view (unless it's been changed in VM config), and contains pretty much all the common code elements that extract product details. You should be able to lift some of that code and place it where it needs to go in other forms.
Good luck with all of this. I find VM coding painful, and community support in the VM forums can be... sparse...

How to have custom sidebar content per article in Joomla?

I'm in the process of porting an existing website to Joomla. Most pages of this website consist of a main content area and a sidebar containing additional items relating to the main content, such as (in-page) links, images, additional information, etc.
In Joomla, the main page content would probably be an article, but I'm not sure what would be the best way to create the sidebar content in Joomla.
Examples of pages-with-sidebar:
http://www.aikikan.nl/en_watisaikido
http://www.aikikan.nl/dojo?id=2
I'm creating a custom template for this website, so any solutions that require modifying the template are fine as well. What would be the best way to set this up?
Keep the content of each sidebar in an article and then assign it to a module by means of the article-as-module extension. You can then control the scope for each module (i.e. choose menu postions for which it will be shown) in the admin interface.
There is an extension called meta mod which is perfect for this sort of thing. It allows you to show modules based on any condition you can evaluate with PHP

Resources