I need to add a CSHTML/HtML both type of pages as the part of the theme only (i.e. inside the theme folder) They are added in the folder but we can use only one page of the theme i.e. Layout.cshtml as master page. The other I need to add are test pages but I need to use that as to put some content & display. How to display them?
http://localhost:65012/Themes/MyTheme/demos/layout1.html
This gives 'The resource cannot be found' Error.
any suggestions
To be able to download static files you need a to enable the StaticFileModule of II7, or the StaticFileHandler for II6.
The fastest way to do so is copy the web.config file from a folder like Media to your demos folder.
Related
I have a wordpress site that used the toivo-lite theme and was able to load a custom javascript by editing the header.php under the toivo-lite theme folder, and then invoking the JS function through the body onload in that header.php file. This worked like a charm.
Now this wordpress site has switched over to the biz-news theme, which in itself uses the agency-starter theme fwiu. I edited the header.php under the biz-news theme folder the same way I did for the toivo-lite theme, but it did not work. I also tried editing the header.php file under the agency-starter theme folder, but that did not work too.
I looked at the generated page but can not figure out what template / php file is being used in order to add my custom JS code. Any ideas?
Here are plugins that helps you
Insert Headers and Footers by WPBeginner this plugin allow to add script or html code insert after body
Show Current Template this plugin show all template file load on current page
I have a wordpress plugin that i want to make work on a simple static website, the plugin is a cloaker so im sure its not wordpress specific and can work anywhere, it contains a php file for the cloaker and a folder with files as seen in the picture picture of the files
Simple way would be to use the plugin on a wordpress page (embed the shortcode in your editor, or more likely create custom page template without footer and header to have a clean page), and use an iframe on your html page to view the content of this page. I would recommend to use the page template because you probably won't need the header and footer of your page.
There are other ways, but you would need to use a php file, not a static html file to make things work.
I'm attempting to modify the following file, defaulted by the OpenEDX lms.
account_settings_factory_spec.js
account_settings_view.js
But upon rerunning paver, files aren't changing. Is it actually possible to override the JS in themes? My end goal is to remove the tabs in the account section as well as edit the additional infomation.
Any help towards reaching a solution would be appreciated!
Thanks.
Is it actually possible to override the JS in themes?
yes, tricky
copy & paste from original and edit/modified "account_settings_view.js" and "account_settings_factory.js" to your theme folder
/edx/app/edxapp/themes/my_theme/lms/static/js/student_account/views/account_settings_view.js
/edx/app/edxapp/themes/my_theme/lms/static/js/student_account/views/account_settings_factory.js
and copy(from original) & paste "account_settings.html" to your theme folder
/edx/app/edxapp/themes/my_theme/lms/templates/student_account/account_settings.html
and find this line and edit, this path should be your theme JS path. Check how your custom CSS or JS linked in the header(see image below, "payne" is my theme name).
<%static:require_module module_name="YOUR_THEME/js/student_account/views/account_settings_factory" class_name="AccountSettingsFactory">
I just changed here you can see below. Just added "xxxx" Here I used Docker devstack.
So I found this piece of code: https://gist.github.com/NoUsername/9308327
I downloaded it as zip, created a new folder name "images"in the root directory (same folder where I put the HTML file), and added some jpg pics in it. But when I opened the HTML file, the images won't load.
Is something wrong with the code?
P/S: When I changed the source of the tag to "/images/<1st pic's name>.jpg", the 1st image showed up just fine, though.
I believe this script assumes you have enabled directory listing feature of apache for /images
See https://support.tigertech.net/directory-index
When you access http://your.server/images it should show a list of the files as a html page. This script uses this list to get the image urls and render them.
To enable the feature you need to create a .htaccess file inside /images with the options provided in the documentation link.
If the answer of #venimus doesn't work. Be sure about your image path. You can use fullpath istead of "/iamges", like "http://localhost/image_directory". Last of all If you image's extension in uppercase like "image.PNG" it can't find your images.
My friend asked me to add a simple javascript to her page. Unfortunately it is built on joomla (which I have never used). I cannot find any place to include such a script. There are some empty indexes everywhere. Is there any way to do this? I just need to make the page scroll to some position after pressing a button.
Try to add your script in this file:
[sitename]/templates/[current_template]/index.php
You can find out the name of the current template in
Go to Administration > Extensions > Template Manager (it will be starred, see screen below)
After that you shold click on template name link, and on other page click Edit main page template for editing index.php (it depends from template).
The second way to find out the template name it's browser DevTools, see screen below.
Also you can edit template file via FTP + your text editor.
UPDATE: For Jm internet theme main template file is here:
[template_root]/tpl/default.php
Also main template layout can loads from these files: content-left-right.php, left-right-content.php etc. It depends from selected options in template settings.
Add this code in your template, the path may vary depending on the framework or structure of your template, most commonly the main file is called index.php.
$doc = JFactory::getDocument();
// In this example the js file is called main.js inside js folder
$doc->addScript('/templates/' . $this->template . '/js/main.js', 'text/javascript’);
Some templates also include an option to add your custom files or code directly
in your template configuration, check out the options of your template.
Regards.