Customize X-Cart 5 error page - x-cart

I have a store created on X-Cart, and I want to change/customize the contents of default error/404 page. I am using X-cart 5.3. Any ideas what can be done?
TIA

Ankit, if you want to change the default contents of the error page (not 404) or the maintenance page (this page shows while the store is in rebuilding state), you should look at the public folder of your X-Cart installation.
This folder contains error.html (this page is for admin user), and maintenance.html. Also, public/customer folder contains another error.html (the one that shows to the customers).
Don't modify these files, because they will be overwritten during the upgrade (replacing with the stock ones). Instead, copy them to another folder or create the entire error page from scratch. After that, modify the etc/config.php file to set the correct paths for the error pages like that (replace the <your_dir> part with your folder with the customized pages):
; Error handling options
;
[error_handling]
; Template for error pages
page = "<your_dir>/error.html"
page_customer = "<your_dir>/customer/error.html"
; Template for maintenance pages
maintenance = "<your_dir>/maintenance.html"
Make sure these options are not repeated in the config, if they do - remove the stock ones.
The 404 page is the different case because it is being rendered by the X-Cart templating engine - Twig. There are two ways to edit its content:
You can modify page heading and text labels. Open the X-Cart admin and go to the Store Setup -> Translations page and click on the link with the labels count across the language you want to edit.
Search for "Page not found" label, and click on the globe icon near the trash icon to edit all available translations. That is the heading of the 404 page.
Later on, search for "The requested page could not be found." label and repeat the procedure. This label contains the text of the 404 page.
Please note that any HTML code will be stripped, use the plain text only.
The second option is to modify the template HTML code. You should be accustomed to editing HTML and Twig languages, you should also have the ThemeTweaker addon.
Copy the skins/customer/404.twig file to the skins/theme_tweaker/customer/404.twig and edit it with the text editor.
Rebuild the store at the cache management page afterwards.

Related

How can you rename a wiki page in Fossil SCM?

How can I rename a wiki page in Fossil SCM?
In my particular case, I'd like to rename my project (in Admin, Configuration, Project Name), but if I do that then when I click Home in the main menu nothing is displayed, because there's not yet a wiki page whose name matches my new Project Name. I'd like to rename my project, and rename my (sole) wiki page to match.
You can’t rename a wiki page, because wiki pages are identified by their name; that would be tantamount to deleting the old page. And you can’t delete a wiki page; Fossil never deletes an existing artifact.
But you can create a new wiki page (with your project's new name), and copy the old page's contents to the new one. If you remove all the text from the old wiki page, that old page will disappear from the list of wiki pages.
There's something to be said for a wiki rename command that would implement this sequence of actions automatically, but that hasn't been done so far. You can post a request on the fossil forum, and see if one of the developers picks it up. :-)
In principle it can be renamed by running the following in a SQLite file editor (if you try it from the "Raw SQL Commands" page, only the first UPDATE is successful):
UPDATE attachment SET target='new name' WHERE target='old name';
UPDATE event SET comment=':new name' WHERE comment=':old name';
UPDATE event SET comment='+new name' WHERE comment='+old name';
UPDATE event SET comment=replace(comment, '[old name]', '[new name]') WHERE comment like '%[old name]%';
UPDATE tag SET tagname='wiki-new name' WHERE tagname='wiki-old name';
At first glance it works but then you will not be able to update the content (which in fact can be useful to protect an article).
For the renaming to be effective you also have to modify the binary blob that contains the article, as well as update the deltas in case you have made previous edits.
I was working on this script that does the above automatically. To use it you have to execute the following in a console:
fossil_editor.py oldname newname repo.fossil
If everything goes well, something like this should appear:
This is fossil version 2.16 [7aedd56758] 2021-07-02 12:46:01 UTC
Artifact 61e7cc32f7 updated to 84b8195fe6
Artifact c2290869ad updated to 3ff4f96773
Artifact e993cd0331 updated to bc7e8d52df
References updated

How to create a static About us page in opencart

I am a beginner in using opencart.I need to create an About us page from admin and have to link it to my main menu navigation.How to get this?
Step 1 : Goto information link in catalog tab
Step 2 : click to insert a page or information page like about us
Step 3 : if you have enabled seo then you can write keyword for you aboutus page or information page then your url will be easy to use e.g below if seo is disbaled then your url will be little boring e.g(index.php?route=information/information&information_id=4)or simpler to it which will not be good to share or use
NOTE: for seo you should use .htaccess file
It very simple go to admin panel
catalog -> Information
here you can see all the static pages such as About us,Delivery Information etc
edit them and changes will appear on front page .
to insert new page
catalog -> Information -> Insert
most complex opencart themes have a module like menu that you almost always can edit in the backend, if you wish to you can add it manually, to do so locate header.tpl in catalog->view->theme->common and see if menu is called directly there probably in a section or in an external file, probably located in the same folder, if you wish to you can send me a message with further info and i would be glad to further assist you, its really simple, if you find your way around.

Theme for inner menu item does not work. Joomla 2.5

I have a website in Joomla and have created two themes for main-and-inner pages respectively.
When i created inner menu items i assigned them the inner-theme it works fine the first time you navigate to the theme but on the second hit to the page it just shows the home page theme. its really odd.
On my local machine everything works perfectly, this issue only arises when i upload it.
One more thing i am new to Joomla the way i made the template was i used the same home page template and changed the name attribute in the inner page but kept some of the module name same as in the home page so i could assign the module once and it could work on both templates. inner page differs in size of the banner & has breadcrumb module + 1 more that differentiates it from the home page.
This is most likely caused by the Itemid not propagated properly. The Itemid identifies a menu item, from which the settings are read. If the Itemid is missing, the settings of the default page (your main page) are used instead.
If you just want to slightly change the appearance of the front page and other pages, you can do that with one single template. See the Joomla! online documentation for how to determine if the user is viewing the front page.

Sitecore how to hide/disable HTML tab from your Rich Text Editor

Could someone suggest how to hide/disable HTML tab from your Rich Text Editor on sitecore?
I had a look at this, but requires a change on Sitecore core rich text XML.
Problem with this solution is we need to modify the XML for each instance and what about upgrades?
Thanks.
In the Core database (you can switch using the icon in the bottom right next to the clock) you can go to /sitecore/system/Settings/Html Editor Profiles/*profile you want*/buttons/HTML view and deny read-access on that for your users. Alternatively, at least in Sitecore 6.5, there's a profile without the HTML view. It's called Rich Text IDE. You can set the datasource field of a Rich Text field to that one, and not have the HTML view.
That's only removing the HTML option on the bottom left though, I'm not sure how to remove the Edit HTML option you have before you've opened the RTE itself (where you have Show Editor/ Suggest Fix / Edit Html). Looking at This question it might be you'll have to change the XML anyway.
The way we've got upgrades and different instances handled is by having the changed file in source control, and making sure we include it when building a deployment package.
Adding onto Trayek's great answer - you can remove access to the "Edit HTML" as outlined by Alex Shyba below:
Go to the core database, locate the field definition item:
/sitecore/system/Field types/Simple Types/Rich Text/Menu/Edit Html
On the Security Tab, click “Assign” and select the role you don’t want this option to be available to. Deny inheritance of this item or specify other security settings that make sense for your needs.
I added "Everyone" and then selected the "X" by Inheritance for Items, and the "Edit HTML" option was removed.
Taken from:
http://sitecoreblog.alexshyba.com/2009/10/quick-tip-remove-edit-html-option-for.html

default text in mediawiki new pages

Does anyone know how to make mediawiki automatically populate a new page with some text when the edit button is clicked for the 1st time? I have tried the MediaWiki:Newarticletext page but this only affects the text that is displayed when a user visits a page that doesn't exist. I would like to provide my users the option of a pre-built template type page that doesn't require them to type in a lot of text that will be very similar on many new pages.
I don't think mediawiki templates are the way to go as they just imclude the text when the page is rendered and they don't provide the text for the user to customise.
thanks
Have you tried MultiBoilerplate? You can se this to load default pages - and you can create multiple default. The only problem is that it won't load when you create the page but just after (you need to press Load).