How can i make customized template for the front end by overriding the default one? - pyrocms

I am new to Pyrocms and reading the documentation I could not change fix my problem. I need my own template to be incorporated that is I want to change the default one provided. How can I do that. I really need a help.

Go into:
system/cms/themes/default/
This is the folder where you can find the default template of pyrocms. There you will see folders like "views, css, js, img" etc.
You can start by modifying views/layouts/default.html and views/partials/ folder.
Ofcourse if you need to change css and/or js you need to modify them too.
By the way this is the official pyrocms documentation for editing themes:
http://www.pyrocms.com/docs/manuals/designers

Related

How can I customize Docfx documentation (themes or templates)?

I just started using Docfx and set up some basic conceptual documentation. Now I want to make some adjustments to the theme (company logo, perhaps some font changes, etc.) Minor stuff.
The official documentation only gives a high-level description of how to create a new template. I've never used a templating language before, so I'd like to avoid that for now if possible.
My question is: how can I make small adjustments to the default theme, like some CSS changes and perhaps adding external resources (like font awesome)?
Do I have to create an entire template (or a part of it) or can I include a CSS file somehow? The documentation mentions a theme option but so far I've found no examples or existing themes to learn from.
A mere link to a project that uses a custom theme or template would already be very helpful. The docfx repo has a docfx.website.themes folder and the default template is also in there I believe, but I couldn't really figure out which files I would have to provide to roll my own.
Export template:
Run docfx template export default, then you'll see default template in _exported_templates\default
Change themes in default template, e.g:
Adding external resource: modify styles\head.tmpl.partial
CSS change: modify styles\docfx.css or styles\main.css
Use customized template:
Run docfx -t _exported_templates\default, which will use your customized template!
NOTE: It is possible that DocFX updates its embedded templates when releasing new version. So please make sure to re-export the template if you overwrite or dependent on that template in your custom template.

Local.xml change or only adding files?

I found out, that frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml
does control the parts of my bundle-pages that I want to edit. So, alright I could edit this file directly but I learnt, that isn't recommended due to upgradability-problems.
So, what would I alternatively need to do? Do I just need to add a new file
frontend/my_package/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml
like this and put all my stuff in there, or do I also need to reference something into my layout within local.xml? How would I do that?
Thanks
So yes simply make this file in your theme and then you can edit it to fit with your design.
The other option which is a bit more complex is to update the template via some layout xml and then this new template will be used and you can add it to the base folder with whatever new path you like. I would suggest that your changes are probably theme specific and so should be made by making the changes in your theme.

Magento template placement

I am developing a magento module that should inject some javascript at before_body_end. What I don't understand is where I should place my template file. In all tutorials, people suggest that they should be placed in app/design/frontend/default/default/{ModuleName}/{TemplateName}
First of all I can't get this to work. I get the error: Not valid template file:frontend/base/default/template/...
Furthermore, if I understand correctly, this would put the template in the default theme. But what if the end user uses another theme?
What does work, is placing the template file in app/design/frontend/base/default/{ModuleName}/{TemplateName}. However, I am not really sure if this is the way to go.
Can someone please tell me what the right course of action is here?
P.s. I need to modify the js based on conditionals. That's why I am not using addJs to inject the js.
Go to System -> Configuration -> Design -> Themes and check you fallback settings. You probably don't have "default" there.
First, Magento will look for the template, which is in the folder set in the "Templates" field in "Current package name" package , then if it doesn't exist, it will look for the template, which is set in "Default" field in "Current package name" package, and then it will look in the base/default folder.

JOOMLA, Best way to make alternate layouts for articles?

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!

joomla autogenerated css classes

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.

Resources