Adding more templates into editor - ckeditor

I have been using ckeditor 4 in my CMS and using the template feature to allow the user to add a collection of template styles they've agreed open in to the editor so they are able to create uniquely styled pages. I have it so they can see the different colours templates within the editor, which allows them to see what section there typing content into.
The problem i'm finding is that after its saved and i go back into the editor to add another template, it only adds it within a existing template and i am unable to click outside of it. The only way i have to get round it is to copy and paste a section from the source.
Is their a way to allow me to click or move the cursor outside the template so i can add another one underneath it and not in it?
Regards

Add to your editor the Magic Line plugin. It adds a "floating bar" that allows to place the cursor after elements like tables, divs, ...

Related

CS-Cart Menu in custom template

I am making a template in CS-Cart by including the needed tpl files directly into my html where needed. But what I'm not sure how to do is include the main menu.
eg.
{include file="common/search.tpl"}
I've created a custom menu, which currently contains two categories and two pages, and called it 'Top Nav'. How do I include this in my html template file?
You can do this, but you'll still need to use the block manager.
You can create a block for your menu, and manually insert it by following the tutorial here: http://forum.cs-cart.com/topic/29828-a-simple-way-to-add-any-content-on-any-place-on-template/
Though, as Alexander points out, it's not the recommended way to do it.
You should consider to start using the built-in block manager.
A block is a "widget" that can be put into an any place on the page using GUI at the administration panel. There is no separate template for that, blocks are being rendered dynamically - you can't just include it into your template.
So you should create a block that will render the menu you've created and position it on your page layout.
Check out the documentation to learn more: http://docs.cs-cart.com/4.3.x/user_guide/look_and_feel/menus/index.html

How to create a batch script to find and replace pages within multiple documents

I have created several Word Templates and Forms (over 100). If any form in a template changes, all like forms in other templates must be updated as well. For example, if another field is added to the form, then I need to update 100 templates with this same added field. So, let's say the templates are saved according to client:
Q://Master Templates/Client Name/Client Template
(Note, the client template may have about 30 or more pages - like a contract and the form might be page 29 in this client, but another client may have 60 pages and the form might be page 20).
Then, there is another folder where the form is a standalone form, or part of a group of forms that are used together. Example:
Q://Master forms/Group Forms
Q://Master forms/Standalone Forms
First question: would it make sense to have a batch script that finds the form in each template or each folder; and then should the script find add replace the extra field, or does it make more sense to replace the entire form in the templates?
Second question: how would / could I do this? Is there a way to write the script to replace the form in each location based on the example above?
Third question: what types of security risks or problems such a batch script can create for an enterprise-wide network?
Thank you in advance for your support.
Probably the best answer is to use the Developer ribbon in Word. Within Word, File > Options > Customize Ribbon > Check the Developer item under Main Tabs.
Next, open one template needing changes and click Record Macro then make your changes.
Now you can open (In Windows Explorer, ctrl + click then right click to open multiple files) the other templates needing the changes and replay the macro to make those changes.
You could even record opening another document then just add the VBA code to open the other templates and play back the recorded macro to make the changes.
Here's the VBA to open a document in Word.
ChangeFileOpenDirectory "C:\Users\Administrator\Documents\"
Documents.Open FileName:="My File.docx"
Now once you get at least something partial, post back and we can help refine that.

How to change Back to top label in Joomla 3 template Protostar

Protostar is Joomla 3 default template. In the footer part, there is a link Back to Top which returns the user to the upper part of the html page.
The only document in which I have found this text so far is on location:
templates/protostar/language/en-GB
But, the change of the text didn't actually change it on website. So, I suppose there is another location for this.
Where can I go and change it?
When the template is installed, that file would get moved to language/en-GB/en-GB.tpl_protostar.ini, so that would be the file that actually needs to get updated.
That being said, a better method is to use the language override feature on the admin side. You'll see in that file that the language key is TPL_PROTOSTAR_BACKTOTOP (what is to the left of the equal sign).
On the admin side, go to Extensions -> Language Manager. Then on the left side of the page, click "Overrides". Hit the new button and add TPL_PROTOSTAR_BACKTOTOP as the constant and whatever new text you would like there in the "Text" box.
By using the override feature you protect your site from updates if the template's language file is updated in a later version.
If you want to use your site with other languages than English, create the respective template language pack in folder templates/protostar/language/
As an example: If you use German on your site, create a folder named de-DE, copy the english files en-GB.tpl_protostar.ini and en-GB.tpl_protostar.sys.ini into it and change their names to de-DE.tpl_protostar.ini and de-DE.tpl_protostar.sys.ini. Now you can change the respective line in de-DE.tpl_protostar.ini to TPL_PROTOSTAR_BACKTOTOP="nach oben"

Remove main menu and header from a page in Joomla

I want to create one or two pages on my website with no header or main menu or anything - i.e. just the main content.
I am using the Acacia template from Rockettheme. The main menu and the logo are not published as modules, so I do not know how to remove them from specific pages.
Is it possible to create a separate layout or something?
First check the template settings if there is any alternative layout. If not, you have to duplicate the template and then tweak the copy to fit your taste.
To duplicate the template depending on your joomla version see this for J1.5 , this for J2.5 or this for J3.2.
After you do that, either hide via css the header element like so header{display:none;} or remove completely the <header>...</header> section from the index page of the template or from where this code is being generated.
Then assign this copy of the template to the pages you want.

How to add js to a joomla template

i need to add js to a specific page in joomla. How do i do that? I cant find any option to edit the html of each page, since i also have to add some little html. How does joomla do that? i can assign a template for a specific site but then you would have to do each change twice...
I need to add a javascript file and some html to one specific site. i read the wiki and googled but i dont get it...
The reason you couldn't find a page to edit is that there is only one page in a Joomla site that builds all the other pages based on the URL, menu ID, and other parameters passed in the query string.
If you only need the javascript on a single "page" then there are a couple of ways to do it depending on where the content needs to be.
If it needs to go in the main content area (the component position) then you should get an extension that allows you to put javascript inside a regular Joomla article. Then you can put what ever code and HTML you need in the article and link to it with a regular menu item.
If you want it to go in a module position, then you can simply use the Custom HTML module. If you turn off the WYSIWYG editor editor, you can put the javascript right in to the content area of the module. It does require the editor to be off though, otherwise the code will be evaluated and you will lose what ever you had in there. You can also limit where the module displays under the menu assignment selection.

Resources