- Posts: 31
COMMUNITY FORUM
mobile template
- antonio maarawi
- Topic Author
- Offline
- Junior Member
Less
More
10 years 10 months ago #120699
by antonio maarawi
mobile template was created by antonio maarawi
I am using the default k2 item. php in my website desktop version, i prepared a new item.php which is suitable for mobile layout. can i know how i can redirect the layout if it is mobile to the mobile template?
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
10 years 10 months ago #120700
by Yiota
Replied by Yiota on topic Re: mobile template
Is there a way you already target your mobile site?
Do you use http request, for example?
Do you use http request, for example?
Please Log in or Create an account to join the conversation.
- antonio maarawi
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 31
10 years 10 months ago #120701
by antonio maarawi
Replied by antonio maarawi on topic Re: mobile template
it is the same website, but it has a mobile version ready, but the item.php which i am using is not suitable for the mobile layout, i am using 3 columns and some changes in ti. i prepared an new item.php for mobile version and i want to redirect to it if it is mobile.
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
10 years 10 months ago #120702
by Yiota
Replied by Yiota on topic Re: mobile template
In order to call a completely different file for your mobile version you will have to use an extension that gives you the ability to load a completely different joomla template based on the device, mobile/tablet, etc. There are many if you check the JED.
The option I will recommend however is to just change the layout only through CSS manipulation and avoid the use of a different file. Add classes that will change according the media query they are in.
The option I will recommend however is to just change the layout only through CSS manipulation and avoid the use of a different file. Add classes that will change according the media query they are in.
Please Log in or Create an account to join the conversation.
- antonio maarawi
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 31
10 years 10 months ago #120703
by antonio maarawi
Replied by antonio maarawi on topic Re: mobile template
the problem is i have two columns in item.php k2 item view (Left and right column) and i try to make them one column in mobile.css without any changes.!
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
10 years 10 months ago #120704
by Yiota
Replied by Yiota on topic Re: mobile template
Did you ask your template provider/developer to help you with this?
Please Log in or Create an account to join the conversation.
- antonio maarawi
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 31
10 years 10 months ago #120705
by antonio maarawi
Replied by antonio maarawi on topic Re: mobile template
yes but i made those changes to the template, (the 2 columns), their default template is one column,
Please Log in or Create an account to join the conversation.
- antonio maarawi
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 31
10 years 10 months ago #120706
by antonio maarawi
Replied by antonio maarawi on topic Re: mobile template
it is an example for the item.php layout i am using.
www.elmarada.org/our-news/marada-cadres/27156
you can see the right and left column which i need to make them 1 column in mobile layout
www.elmarada.org/our-news/marada-cadres/27156
you can see the right and left column which i need to make them 1 column in mobile layout
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
10 years 10 months ago #120707
by Yiota
Replied by Yiota on topic Re: mobile template
Instead of having the styles put right inside the item.php you can just put 2 classes. One for the left container and one for the right that will contain those exact styles you already have.
Then when you are on a mobile device you will give a 100% width on both of those classes and you will have 1 column.
Then when you are on a mobile device you will give a 100% width on both of those classes and you will have 1 column.
Please Log in or Create an account to join the conversation.