I would like to customize view.php file which is the core file of moodle, since modifying it in core is not good practice I would like to modify it from my theme,
By default there is a cool theme, I just copy pasted the course directory into it and Try to customize it but moodle is not recognizing my directory.
What is the procedure to do this kind of customization, I check this link but unable to follow it since I don't understand. Can any one help me here about it?
Despite the fact that there are several view.php files, which one do you want to adapt?
Please note that you cannot simply overwrite for example course/view.php in your theme. You have to override the specific renderers, see https://docs.moodle.org/dev/Overriding_a_renderer
To override an url in Moodle you may use custom scripts. However if it's a matter of a renderer you should try overriding that first.
Related
I'm currently working on setting up a custom admin page for a specific task I need to do and it requires some custom styling in the theme. I went to the themes/SuiteP/css folder and found admin.scss. After making a change, I had assumed that Suite would dynamically compile the asset since I am developer mode; however, that did not happen.
I decided to search the code for any place I could find that would deal with compiling those files to *.css, but found no such place.
My question involves inquiring as to where that compilation takes place and/or how it takes place. Right now it appears as if I have to manually compile those assets, which seems pointless because it is just an extra step I have to manually take, rendering using SCSS less useful in comparison with CSS.
Right now, my solution will probably have to be adding a CSS file that has nothing to do with whatever pipeline exists, but if I can leverage existing functionality, that would great.
Due to legacy issues with the SugarCRM framework, SuiteCRM loads style.css for current theme. The sass work for SuiteCRM is in a transitioning period. It is currently a manual process, but we hope to make it automated in the future.
We are using Sass as a way to allow developers to customise the SuiteP theme. I have a github project which provides a UI to generate the variables.scss for you. I am hoping that it will be accepted in a future release.
So in regards to your workflow you only need to care about the style.css.
If you want to contribute back to the SuiteCRM project, then you will need to use the sass files in themes/SuiteP/css/.
However, if this is just for your instance of SuiteCRM, then you will want to create a style.css in the custom/themes/SuiteP/css/style.css. How you change that is up to you.
I would recommend that you use Sass to generate the style.css.
You can achieve this by copying the style.scss file custom/themes/SuiteP/css and then add the following to the file
#import ../../../../themes/SuiteP/css/style.scss
Note: I may have the path slightly wrong
or use the command line tools to include the themes/SuiteP/css/ directory
See for details:
SASS: Import a file from a different directory?
SuiteCRM should pick up the rest of the work. There is a change in SuiteCRM 7.9 that deprecates the $sugarcrm_version in favour of $suitecrm_version. This will effect theme themedef.php.
See for details
https://github.com/salesagility/SuiteCRM/pull/3233/files
I hope this answers your question.
I recently had a task dumped on me, all I need to do is add a link header to a template in joomla. I'm able to do this directly inside the default.php in
/modules/mod_articles_category/tmpl/default.php
but of course it shows up in any module that uses that template, which isn't acceptable.
I havn't touched joomla before yesterday and I'm suprised at how painful this has become!
I've been following tutorials, creating an override template in
templates/template_name/html/mod_articles_category/default.php
but I dont see any option to utilize this override template in the module options of the admin console.
I also tried creating a duplicate of the module itself with the link header simply added into the default.php file but don't have any option to have this module installed since there is no module manager extension, just barebones joomla 3. What I'd like to do is use the override template, since it seems like the simplest solution.
What am i doing wrong that I cant see any effect from my override template?
Rename the file templates/template_name/html/mod_articles_category/default.php to something custom like templates/template_name/html/mod_articles_category/linkInHeader.php then save it.
Go to your module manager and open that module. GO to Advanced tab & select linkInHeader in Alternative Layout dropdown. This should do the tricks.
I am trying to include the Redux Framework in my theme. I decided to try the online builder of Redux Framework: http://build.reduxframework.com/ to generate the necessary files for me.
The builder of Redux provides two options:
(1). To generate and export the admin folder.
(2). To generate and export a starter theme with the Redux settings.
I think i need option (1) since i have a theme already in my hands.
The admin folder contains the following:
(1). The Redux Builder generated (.Json) file.
(2). The admin folder itself - which contains the framework and extensions folders along with two (.php) files: (admin-init.php) and (options-init.php).
The documentation of Redux Framework teaches us how to load the config file of the framework inside our theme. It does not inform us through what to do with the exported admin folder and how to use it in our theme - in case we chose to use the online builder.
The online builder of Redux framework states the following:
Download just the admin folder portion. This will provide you with a
folder you can place in a theme or plugin and include
~/admin/admin-init.php to initate it.
Side note: It is written as "initate" instead of "initiate". If any of the developers happen to read this question, it may be a nice thing to correct this small typing mistake.
My Question:
(Q1). How should i initiate the admin file? I couldn't find that in the documentation. Is it about copying its content to the (functions.php) file after fixing the directories? Or something else is required?
Include the Redux framework.
Copy the generated admin folder to your theme.
Copy the contents of admin-init.php to functions.php file of your theme.
Fix the directories names and files depending on your theme's structure.
Is that right or i am missing something up there?
Any clarifications, answers or comments will be greatly appreciated.
Thanks in advance for your help!
There is another way to initiate, i don't know if it's the best way or not
in my themes, i add :
require get_template_directory() . '/admin/admin-init.php'; )
in my function.php so i don't have to fix the directories files and names in redux admin folder depending on my themes.
Lead dev of Redux here. Good call on the spelling check.
Just include that file and that's it! :)
In a Joomla website, can I directly edit the default.php file in the modules folder's template folder? Or are those automatically generated while creating the site? Any guidance is appreciated. Thank you.
Please provide me with concrete images and stories about Joomla instead of repeating what documents say please.
[UPDATE] As long as it works, I edit ALL myself. Oh yes, soo good my first obstacle is being clarified.
if you want to make some changes to the files placed in modules/mod_abc/tmpl
(replace mod_abc with your module name)
you need to copy that file to joomla-root/templates/[your-current-template]/html/mod_abc/
then you can edit your file here. This is the standard joomla way to override module template.
Under the path "\sites\all\themes\fusion\mytheme\", I found that some php file called "taxonomy_term_page.tpl.php", "views-view-fields--product-brand-category--block-2.tpl.php"... will generate some specific content on specific page, how can I configure this php file to specific link/block or whatever?
Yeah it would be a bit long to explain what to do with regards to what each file does. You would need to play around a bit and see how it all works.
I would recommend that you check out:
http://drupal.org/theme-guide/6
and read up on how the theme system works for the Drupal version that you are using.
but for example the "taxonomy_term_page.tpl.php" would be used to change the output of content that you would visit for a taxonomy term that you created.
eg. mysite.com/taxonomy/term/ which might be mysite.com/cooking-books/italian-pizzas
and the "views-view-fields--product-brand-category--block-2.tpl.php" would be for theming the output to one of your views which is configured to output as a block...
I'm happy to answer any more of your questions
You aren't going to be able to configure a specific file to fill the role for a specific theme (the files are picked by their file name for their purpose).
You should check out the devel module (specifically the theme devel module), which can tell you what parts of the output are expected in specific files. I'm not sure if the themer module is still in devel for 6.x, but if it isn't, try the devel_themer module.