The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 16 posts ] 
Author Message
PostPosted: Fri Jan 18, 2013 6:25 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jan 18, 2013 6:14 pm
Posts: 25
I am running 2.5.8 and using Mobile Joomla to switch over to mobile site template when loaded from a mobile device.

I am trying to override the default template's com_content and make it display in my mobile site template after copying the files from the template_name/html/com_content folder into my new template's html/com_content folder and editing it. This did not work. I then tried copying appropriate files from components/com_content/views/ into my html/com_content folder in my template like the Joomla docs says to do and this was unsuccessful as well. Any reason this is not working? Any help would be very very much appreciated. Thank you!


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 7:06 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sat Apr 14, 2007 9:16 am
Posts: 108
Location: Russia
chris_dryke wrote:
I am trying to override the default template's com_content and make it display in my mobile site template after copying the files from the template_name/html/com_content folder into my new template's html/com_content folder and editing it. This did not work.


It should work if it works in source template. Maybe you have enabled caching? Or there is a typo in "html/com_content" path.

_________________
Visit my blog — Interesting about Joomla! http://joomup.com/blog/.


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 8:05 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jan 18, 2013 6:14 pm
Posts: 25
How I see if caching is enabled?

The folders "html" and "com_content" are spelled like I'm typing it, or were you referring to a specific file(s) inside?


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 8:24 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sat Apr 14, 2007 9:16 am
Posts: 108
Location: Russia
chris_dryke wrote:
How I see if caching is enabled?

In Joomla's Global configuration.

chris_dryke wrote:
The folders "html" and "com_content" are spelled like I'm typing it, or were you referring to a specific file(s) inside?

I mean that maybe there is capital "I" instead of "l" in "html" or smth like it, but it is very unlikely.

_________________
Visit my blog — Interesting about Joomla! http://joomup.com/blog/.


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 8:47 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jan 18, 2013 6:14 pm
Posts: 25
Well, it's not caching because it's turned off.

It is displaying what is in the html/com_content folder for the default template, not the template that is being viewed.


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 9:03 pm 
Joomla! Master
Joomla! Master

Joined: Mon Oct 27, 2008 9:27 pm
Posts: 18006
Location: Akershus, Norway
How is the template selected? Is it assigned to a menu item or something else?


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 9:07 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jan 18, 2013 6:14 pm
Posts: 25
When you log on to the site normally, it will display the default template. When you log on using a mobile device, I have Mobile Joomla that makes it detect the mobile device and then it displays a different template for mobile users, so basically a mobile version of the web site.


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 9:12 pm 
Joomla! Master
Joomla! Master

Joined: Mon Oct 27, 2008 9:27 pm
Posts: 18006
Location: Akershus, Norway
In that case it's have to be an issue with Mobile Joomla.

Try to assign the template to a menu item and see if that reads the correct override.


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 9:24 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jan 18, 2013 6:14 pm
Posts: 25
I assigned a menu item to the mobile site template and clicked the menu link on the main site (using the default template) and the destination page still looked the same.


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 10:14 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sat Apr 14, 2007 9:16 am
Posts: 108
Location: Russia
Do you use sh404sef extension? As far as I remember, previously (I'm not sure about latest releases) it temporary changed template to beez on component rendering, and then changes it back, so that overrides for components are not used (the idea was to use div layouts for com_content from beez template).

_________________
Visit my blog — Interesting about Joomla! http://joomup.com/blog/.


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 10:19 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jan 18, 2013 6:14 pm
Posts: 25
Negative, I searched through my extension manager and did not see that extension.


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 10:24 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sat Apr 14, 2007 9:16 am
Posts: 108
Location: Russia
Then firstly check that overriding correctly works in default MobileJoomla's templates. If it doesn't, there is a conflict with other Joomla extension(s). If it does, most likely some paths for overrides in your template are incorrect.

_________________
Visit my blog — Interesting about Joomla! http://joomup.com/blog/.


Top
 Profile  
 
PostPosted: Mon Jan 21, 2013 7:26 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jan 18, 2013 6:14 pm
Posts: 25
So over the weekend I was able to receive a response from the web designer who had developed the page that applies to my situation here and this is what he said in his email:

Quote:
The edits won't take effect because the events page is assigned to a specific template file. This is a limitation of the mobile joomla component. You can make it display the mobile_new template by editing the default template file to include a condition: if the current device is mobile - then include the files in the mobile_new template.


So now my question is just where do I need to put this condition and does anyone even know what this code is going to look like ???

Thanks to all for your responses; you guys have a great help so far and I appreciate it highly.


Top
 Profile  
 
PostPosted: Mon Jan 21, 2013 8:11 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sat Apr 14, 2007 9:16 am
Posts: 108
Location: Russia
Do you really need to use two different mobile templates for your website?

_________________
Visit my blog — Interesting about Joomla! http://joomup.com/blog/.


Top
 Profile  
 
PostPosted: Mon Jan 21, 2013 8:18 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jan 18, 2013 6:14 pm
Posts: 25
No, I just need one. I have the default template that runs normally named "oneshow" and then when you're on a mobile device I have the Mobile Joomla! plug-in that switches the template to my mobile template called "mobile_new".


Top
 Profile  
 
PostPosted: Mon Jan 21, 2013 9:20 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jan 18, 2013 6:14 pm
Posts: 25
Okay, I think I'm on the right track now...

So in the menu to get to this page that doesn't allow me to show my template overrides, it says the link is "index.php?option=com_content&view=category&layout=oneshow:events&id=11" and what I want to point out is that the "layout" variable is set to "oneshow" - the name of my default template. I know I can get this in my code to detect this setting by using something like

Code:
$layout = JRequest::getCmd('layout');


but how do I change this setting when $layout is set to my default template in the code? Thank you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 



Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group