Different menus for mobile and desktop version of site - php

I have one page in desktop version. I need to divide it into two pages for mobile version. I thought about making this pages with the cms (I'm using Wordpress) and add to the links in menu bootstrap classes hidden.
Is it possible to make a check box or something else to mark pages which must be hidden in desktop version?

An option here is to create two menus, one for the desktop version and one for the mobile version. There are a conditional tag in wordpress called wp_is_mobile() which you can use to display the menus conditionally. You can try something like
if(wp_is_mobile()) {
//display mobile menu
}else{
//display desktop menu
}

Related

How to force desktop view on a specific wordpress page

I have a WordPress website, I want to show one of its pages in desktop view even on mobile devices. So my question is how to force desktop view for specific pages on a mobile device (WordPress)
You could try to change the meta tags as discussed here: SO: How to force desktop view on mobile devices - Bootstrap?
To change the meta tags for specific pages, you can create a custom page template, or maybe use a plugin (for example: Meta tag manager)
Maybe you can also force things with custom CSS for that page, by giving the content container (ex. .entry-content) some rule like: min-width: 1024px;?

Adding/Importing a ready coded (AboutUs) page into Joomla

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)

Joomla slider and contact us page

i have made joomla template 2.5 but not finished so far.
1) I have a home page with slider i have made extra file for slider slider.php and include it in template.
now slider should be in only home page how it will be possible?
2) I have some other pages like about us, contact, product and categories.
how it will be possible with template to make a contact form and send it to client email id?
I have some more problems will describe but first want to sort out them and then proceed please help .
I think you are a little confused as to what Joomla is. It's a content management system, thus runs on extensions. It's not like creating your own basic PHP based site and hard coding everything.
Don't hard code the slider into the template. Instead, create a module position where the slide is at the moment, then turn the slider into a module. Converting you widgets and so on when you already have the code is fairly simple.
As for the contact form, this is also an extension which is already built into Joomla. So, in the Joomla backend, on the top menu, go to:
Components/Contacts/Contacts
Create a new one and enter the necessary details.
Then, create a new menu item and set the "type" to "Single Contact". Or you could download a contact extensions from JED. If you want to e-mail the members of the site, go to the Joomla backend, on the top menu go to:
Users/Mass Mail Users
Then simply go on from there.
for your slider problem, if you want to display your slider only in landing page or front page then you have to check the front page in your index.php file and then start your slider so that your slider only work for front page like this:
$app = JFactory::getApplication();
$menu = $app->getMenu();
if ($menu->getActive() == $menu->getDefault()) {
// Start display your slider
}
The about example will work in joomla2.5x version..
To know more check the joomla DOC
And for your second question you have two options, one is create a component for contact and then apply on your template or try to find some already made contact components from joomla extensions. OR modify the current com_contect component.

Javascript drop down menu for wordpress

I'm trying to create a javascript menu for my menu I posted a question the other day about a css drop-down but its just to tricky to do that.
Instead I'm thinking script, can someone give me a suitable javascript code that might work in IE? Here is a link to my test website.
I've tried various other jQuery, but they all rely on the parent ul being a class but as its dynamic content I'm not able to change this / don't want to because I would have to change it for each website and every other website I make. If you have a look at the source code on this website you can see what I mean. The website is quite well comented and you can view the menu online 128 roughly and I can't stress enough how this must be compatible in IE.
You can dynamically set the class with jQuery and then initialise the superfish menu. It works in IE6.
There are many plugins available 1-
Dropdown Menu Widget2-Wordpress CSS Dropdown Menu 3-Ryans Wordpress Dropdown Menu 4-Wordpress Superfish

How can I make part of a Joomla template editable via the CMS interface?

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.

Categories