I am busy converting a HTML website into a Joomla temaplate, I got some help doing the home page (index.php), but now the menu items are not linking anywhere. I have a ready coded AboutUs.php page, which I want to important into Joomla and link to the 'About Us' menu item.
Can this be done in the similar way as it is done with the index.php file? Can I maybe upload the file via FTP and link it somehow in Joomla?
Any help on this would be much appreciated.
No it's not how joomla works.
You have to create the second menu item, link it with your content and add the extra modules that your "about us" page have.
If you don't want to do it like that you could create a new template and link each menu to different template but it's not a good approach.
If you are interested about the html part of the php site,
you can just create an article and paste html code in it (do not forget to set the editor in text mode).
If you have css, you may add it int the template's css file.
Otherwise, if you need php functionality, you need to create a joomla component.
If your going to migrate a site and use a tool like joomla i strongly suggest using it the way it was designed to be used. Otherwise theres no point.
When creating from scratch or migrating a site to joomla i would suggest firstly creating (or modifying) one or more templates to get the layout of you site; header, footer, logo, background, modules (eg. menu, login, etc) and component to load and so on.
You will have to recreate the menu items using the menu manager and apply your css to the menu module(you can download free menu modules or use the default one or develop one).
When creating a menu item you can select the template to be used and also what component you want to load (article, sitemap, blog, login, create user, etc...). An article is used to store html content which can be edited through the content manager although there are simple ways to add scripts to your articles.
If you want to add php to your content you have 4 choices.
Template (used to show content which appears on every page; this is where the html starts and ends and where the component and modules' positions are defined),
Component (this is loaded from the template depending on what menu item is selected),
Module (a very simple and easy way to add custom php and html code, can be loaded from the template or from components like in a joomla article),
Plugin (used when wanting to run scripts which dont have any visual content)
Related
I have converted a HTML page to Drupal template by using blocks and page.tpl.php file. Now I have another page that I need to convert and link it to the main navigation menu.
The problem is, that another page have completely different layouts and I don't understand how to create that layout and link it to the main menu. Is it really so complex? I found that it can be done by using panels but I am completely new in Drupal. I need a simple solution. Thanks if anyone can help me.
You can use some module like display suite or panels to create custom new pages with custom layout.
If you want to make all with code (and avoid database configurations), panels module is fully compatible with features (I don't know compatibility with display suite).
It has been a few years since I properly worked with WordPress. Now I have a proposal to build a WordPress site where every page has a custom design and only some areas of each page is editable.
The reason for this is to build a bespoke layout on each page which cannot be messed up by someone non-technical editing it in the CMS, except for small areas which they can customise.
e.g. A page contains one div which has some text in it, which can be edited in the WP admin backend, but the rest of the page cannot be edited.
Can this be done? How?
Edit: There needs to be multiple editable areas not just one. I know how to make custom pages/templates.
One method may be to create new page templates. Just create a new file in your main theme folder (or the templates folder if there is one). As long at the top of that file contains the line:
/*
Template Name: <your template name>
*/
You can design the page however you want. The data pulled from the admin section will go wherever you invoke
the_content();
The rest of the page can be hardcoded.
Then on the post edit page, on the right side (usually), you can choose the template with your template name for that page. It may be a good idea to copy the current post.php or single.php into your custom file and work from there.
For restricting access you can look at setting up user levels and keep your content contributors as "Authors" instead of "admins" so they can't change themes or edit settings.
(See https://codex.wordpress.org/User_Levels)
For creating specific unique pages with an area that gets changed you should look into custom Page Templates. You can create a page template by dropping a php file with the right naming structure into your theme hierarchy and it will get picked up by the back-end as template option when you create a page.
(See https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/)
I solved this problem using a plugin called Advanced Custom Fields which does exactly what I required.
If my title wasn't clear, basically what I'm trying to do is to add my own HTML or PHP page to Wordpress, so i can play around with some web dev.
So essentially I just want a test page/pages added to my site. However since I have installed Wordpress on my website, I can't just add "index.html" to my root folder using my FTP client. I wonder if I can/can't do this and if so how to link to the pages I add using FTP.
Sorry if this doesn't make any sense. I just want to add some of the sites I've already made / ones I am creating to my site so I can easily show clients/employers what I can do, and I apologize again if I'm being an idiot.
Create a sub-directory in your root folder and then simply link to it:
www.domain.com/mysubdir/index.php
the other way to do this... create a page template in wordpress
create a php file named: template_mypage.php
You must put this php comment line at the top of your template file:
/* Template Name: My Page */
go to wordpress backend and create a new page
in the "Page Attributes", you can find a drop down list named "Template". In the list, you should be able to find "My Page"... select it and then save your page.
view it!
You can always create a subdomain or create a folder inside public_html/www/ and redirect it from any other domain or from any static link you have on wordpress
Why not use WordPress and put your portfolio together using Custom Post Types? I recently presented on this and there is a handy plugin for Custom Post Types UI that you can create a whole new section of your site and make templates for your portfolio.
Just a thought.
If you do a static page in WordPress, you can still template using the Page system as specified in another comment. Code your page, separate it into header, footer, content, etc files. You can load the file to your root, but not name it index. If you do a subfolder, you need to not have an existing page in WordPress.
HOWEVER, you can still do a "halfway" static page still using WordPress and do a header-staticpage.php, index-staticpage.php, and footer-staticpage.php and make sure to include the code for WordPress header and footer in the new header and footer so you can still reap the benefits of the default jquery that WordPress allows. Don't forget to name your template and when you create the page in WordPress, you can just leave the content area blank if you have hardcoded the page's content in.
I still recommend trying Custom Post Types. It is not hard and there are some great presentations in Slideshare that cover this aside from the plugin I mentioned earlier in this comment.
So basically I have a template that I use for every single page besides one page - The gallery page - I want it to look a different way therefore I have to take some of the code out of the .php file, but obviously I don't want to take it out of the index.php because that will affect all the pages then.
My question is basically how do I tell the Gallery page (Menu item) to use this different .php file - gallery.php - Much like how in WordPress you can have different .php files for pages.
I know that you are supposed to use the template manager to "Assign" menu items to different templates but how does it know what file to reference for the separate template. Do you have to create another folder on your server that would contain a different index.php?
No need to create another folder or index.php
All you need is to assign a different template for the menu item for your Gallery page.
Go to Joomla administration, select Menus from the top menu in admin, select the menu where is your gallery based and do the following:
Menu manager -> Edit menu item -> Template style (bottom left dropdown) = you can choose which template you want to use for this menu item.
Hope this helps you!
First it is important to understand how Joomla works. There is only one file in Joomla ever. The framework uses index.php from the current template to create the page being requested. That file basically defines where you can put modules relative to the content that the component is going to display. Joomla knows how to build a page based on the query string of the URL (or variables posted if you have SEF URLs turned on). The URL will tell Joomla what component will be supplying the content, and the itemID of the content.
The component is where the code is different from one page to another. For example, a photo gallery component will have the code to display images while a form component will have the code to display a contact form. Index.php never changes, it just loads the code from the component.
The itemID is the important part of the equation because it is how you can assign different modules to a particular page in the module manager. When you create a menu item for Gallery, it gets assigned a itemID that you can then use to assign various modules or templates to that page. When you create a module (like a login module or menu module) you put it in a position, then assign it to all pages, a selection of pages, of all but a selection of pages.
Generally I don't use multiple templates unless there is a structural difference in the pages. You can just use the page class suffix to assign unique IDs to each menu item so you can then control each page with unique CSS.
Title says most of it.
I have inherited a Joomla site and the client wants part of the main template (a feature-type box) to be editable via the Joomla backend.
I guess really it is a content item that never gets displayed as its own page, but as a part of all pages.
Is that possible?
Thanks.
EDIT: By editable, I mean as a piece of content, not as editing the template HTML. I hardly expect non-tech users to get things right in a WYSIWYG text editor, much less change HTML code that could screw up the whole site.
The Custom HTML Module allows you to create, edit, and display your own free-form HTML on a Joomla site using a WYSIWYG editor.
In your administration control panel you can find the "Module Manager" under "Extensions" in the drop down navigation menu. There you can create this module, choose a position in your template to display it, and then select what sections of your site the module should be displayed on.
You want the content items module.
Content Items Module
This way a user can add content as normal using the standard content pages, but you as the developer can set the module up to show that content as a module only. You have a LOT of choices with the above module too, you can set individual, category, intro, main all that kind of thing. Dont link to the page or category and it wont be shown on the main site, just in the module :)
The joomla extension directory is full of great things.
Good luck
You can use a special component for Joomla to edit templates, any part of template, any Tag. See dewem template editor component
Joomla templates are always editable via the backend. Just got to Extensions->Template Manager->Select the template you're using to edit it->and then up in the toolbar there will options for editing the html or the css as well as many design (look) options over on the right. That is in Joomla 1.5.