I'm setting up a site and I've run into a problem:
I've modified the component.php file in order to customize the printing of an article. Unfortunately i discovered that phocagallery uses the same file to display pictures.
Is it possible to indicate a file different from component.php as template view for phocagallery images?
That template file is what controls the look/output of ALL components. You're better off doing a template override for whatever component (like com_content) or doing this to customize the print view.
Related
What file would I need to edit to change (overide) the Joomla 3.3 on Centos default category blog view ?
Im using the Yoo theme Katana theme ...
Ta,
What you have to do is 1st override the category blog view view in your template. Because editing core files are not preferred.
Here’s a simple tutorial to override the layout of the ‘category blog’ view.
First of all we need to create the override folder /templates/current_template/html/com_content/category/
Paste and copy the blog_item.php file located in /components/com_content/views/category/tmpl into the override folder we previously created.
edit the blog_item.php file as you need.
Default category blog listing path is:
{JoomlaSite}/components/com_content/views/category/tmpl/blog.php
That includes other related templates respectively:
{JoomlaSite}/components/com_content/views/category/tmpl/blog_item.php
{JoomlaSite}/components/com_content/views/category/tmpl/blog_links.php
{JoomlaSite}/components/com_content/views/category/tmpl/blog_children.php
In Joomla 3.3.x versions category blog layout is already overridden by default beez3 template, so you need to refer a copy from beez3 templates for latest changes(if any). Path for that is;
{JoomlaSite}/templates/beez3/html/com_content/category/blog.php
{JoomlaSite}/templates/beez3/html/com_content/category/blog_item.php
{JoomlaSite}/templates/beez3/html/com_content/category/blog_links.php
{JoomlaSite}/templates/beez3/html/com_content/category/blog_children.php
You can use this files to override respectively, based on which type of change is required to your current need. You can copy & paste respective files to your current theme's folder like this;
{JoomlaSite}/templates/{Your_Current_Theme}/html/com_content/category/blog.php
Replace {Your_Current_Theme} with your template folder name.
Hi I want to edit some variables before Phpfox rendering them into output without changing main files to keep theme updateable. For example I want to edit the value of location or birthday before they are rendered. What should I do exactly?
The best way to make edits without disrupting any core files is with the use of plugin hooks. You could create your own module specifically for creating plugin files.
Here is a starter guide: http://phpfox.org/kb/article/144/creating-your-first-add-on/plugins/
I would like to change the image of the "Check out now" button in the cart view of VirtueMart. I know the image is located at joomla_root/components/com_virtuemart/assets/images/vmgeneral/backgrounds.png and that I could change it there.
But I fear that this change will be reverted once I update VirtueMart somewhen. I heared about overrides in Joomla, but I found no description how to use them for images.
Edit
The image seems to be used multiple times for different buttons. I want to change them all, so that's no problem - but I would like to avoid overriding every single file using this image.
The css-file for these buttons is located at components/com_virtuemart/assets/css/vmsite-ltr.css. Maybe it would be the best solution to override this file? This should change every button. But where do I have to locate the new css-file and the new image?
In each template there is a "template" override folder... Usually at:
/templates/yourtemplate/html/
You can simply add another folder inside it for the component you wish to work on like so:
/templates/template_name/html/com_component/view_name/view_file.php
You have to figure out which view in virtumart uses your background image... then find the php file in that view and copy the file entirely to the path where you created for you override
Basically the file at
/templates/template/html/com_virtumart/view_name/view_file.php
Will override the one in the normal place like:
/components/com_virtuemart/views/view/tmpl/whereve.php
So when you update virtumart and it overrites the normal install path... your override file won't be touched!
Hope that helps
MORE SPECIFICALLY SOMETHING LIKE:
yoursite.com/templates/your_template/html/com_virtuemart/productdetails/default.php
I can't find a answer for this, I want to know what is the best way to have an alternative layouts for articles in Joomla.
If I understand you correctly you are looking for a way to create additional Alternative Layouts for articles. Under parameter tab "Article Options":
If that is the case, its very close to the other provided answers here. Its just that you got to rename the copied default.php file to something else. If you rename it to custom.php it will end up with the text "custom" like the image above.
Here goes my shot for a step by step:
Find the default layout file(s). You could use the ones provided by the com_content component. They can be found at components/com_content/views/article/tmpl. Copy both default.php and default_links.php.
Now you need to rename and copy the file(s) into a template. The target template can be any of the installed templates. Using beez_20 the new path for the copied file(s) should be templates/beez_20/html/com_content/article/custom.php and templates/beez_20/html/com_content/article/custom_links.php.
Goto to edit article using the backend. Expand the Article Options tab and find Alternative Layout. Select your new layout.
Your template might already provide a article override. If so, you might want to use the files of that template instead (instead of the ones in step 1). So if you are using beez_20, you could copy templates/beez_20/html/com_content/article/default.php and templates/beez_20/html/com_content/article/default_links.php.
Helpful links:
Using Joomla’s Template and Layout Override
Layout overrides in Joomla 1.6
The best way to do this would either to install another content component - such as k2 which is highly customizable. Or any other content component on JED.
Alternatively you could create a template override on the existing Joomla Template. This is preferable to editing the files directly in com_content component as the template overrides will never be overwritten whereas the core files will be in any Joomla Updates. I should add, hopefully unnecessarily that this requires Joomla 1.5, 1.6, 1.7, 2.5 or 3.0 (although this is still in beta as of present). So make sure you're not using 1.0.
To create an alternative layout for the built in articles component the best way to do it is probably to create a template over-ride.
See this article on docs.joomla.org on "How to override the output from the Joomla! core"
Creating an alternative for an article layout is pretty straight forward. You can achieve this by using the core layout override with your published template(s).
First you want to get/copy the core article layout file:
components/com_content/views/article/tmpl/default.php
Then place it into your published template:
templates/YOURTEMPLATE/html/com_content/article/default.php
If the template you are using doesn't have the html folder, then you will have to create that folder and each folder to make that path correct.
Once you have this in place, all you need to do is make changes to that default.php file you have just place in the template and that is it!
i want to make a new joomla template, i dropped into that but i am confused now.
i want to know where is the joomla autogenerated css class list.
for example i insert a module in template and what is the css class for example for menu title or the css class for search input box or what is the default css class for readmore link in main.
i found a little in joomla doc but i want the whole list
I fail to understand how you are prepared to make a Joomla template which is far more complex than a plain CSS template, yet you are unable to find the necessary CSS files. You said you wanted to make a new template therefore shouldn't you know where you have put the CSS file?
You are in dire need of Firebug for starters. Have a look at all it's features. It will help you to find CSS files and the specific line you need to edit.
I assume you are editing someone elses template in which case this is the sort of location you will be looking for.
templates/you_template/css/file.css
It varies with different template so I suggest you download Firebug as I suggested above.