The Joomla! Forum ™



Forum rules


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



Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 
Author Message
PostPosted: Wed Aug 13, 2008 8:20 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Aug 11, 2008 1:28 pm
Posts: 6
I have been trying to get help about this issue and its beginning to slow my work down. I'm using Joomla ver 1.0.11.
I have downloaded a couple of joomla templates to try on my website. Now I want to change some things on the html index file, but I cant because the html file have either java script and php script like the following:

<div class="pway"><?php mosPathWay(); ?></div>
<div id="logo"><a class="logo" href="index.php"><?php echo $GLOBALS['mosConfig_sitename']?></a></div>
<?php include'menu.php'; ?>
<div id="container">
<table cellpadding="0" cellspacing="0">
<tr> <td class="leftcol" valign="top">
<?php mosLoadModulles('left'); ?>
</td>


And I cant edit this cause I dont know where to find the files on the templates. But when I publish the site and view the source, the code comes out as I want it to be on the back end so I can edit and change as it suits my look.

If I edit the html file on the internet or using other programs and save it, the links of the index dont work.
I want the back end of the html file to come out looking like the below code to be easy for me to edit it:

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left"><td><a href="http://localhost/index.php?option=com_frontpage&amp;Itemid=1" class="mainlevel" id="active_menu">Home</a></td></tr>
<tr align="left"><td><a href="http://localhost/index.php?option=com_search&amp;Itemid=5" class="mainlevel" >Search</a></td></tr>
<tr align="left"><td><a href="http://localhost/index.php?option=com_content&amp;task=section&amp;id=4&amp;Itemid=35" class="mainlevel" >Products and services</a></td></tr>
<tr align="left"><td><a href="http://localhost/index.php?option=com_content&amp;task=section&amp;id=12&amp;Itemid=40" class="mainlevel" >Liquidcapital News</a></td></tr>
<tr align="left"><td><a href="http://localhost/index.php?option=com_content&amp;task=view&amp;id=27&amp;Itemid=42" class="mainlevel" >Liquidcapital</a></td></tr>
<tr align="left"><td><a href="http://localhost/index.php?option=com_content&amp;task=view&amp;id=28&amp;Itemid=43" class="mainlevel" >Group profile</a></td></tr>
</table> </td>

Please help...


Top
 Profile  
 
PostPosted: Wed Aug 13, 2008 3:33 pm 
Joomla! Ace
Joomla! Ace

Joined: Mon Aug 22, 2005 7:53 pm
Posts: 1045
Location: Ilkley, West Yorkshire, UK
You want to edit a template's file? Is that right?

If so, then log in to your Joomla admin, thenselect Site>Template Manager>Site Templates
This takes you to a page with your installed templates, click the radio button to the left of your chosen template, then click Edit HTML on the upper right of the page.

This opens up the actual php file that controls your joomla pages. If you are unsure about what you are doing, SAVE a copy BEFORE you start, just copy & paste into notepad or something, NOT Word!

Then you can save it, providing you set the permissions to 666 whilst saving, then return to 644, or if you update to 1.0.15 (highly advised) I think you find a Make Writable for saving option on the actual template edit page.

_________________
My sites: http://ilkleygardeners.org.uk Gardeners, http://wharfedalefestival.co.uk Music Festival


Top
 Profile  
 
PostPosted: Mon Aug 18, 2008 7:06 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Aug 11, 2008 1:28 pm
Posts: 6
Thank you for your reply dragonrider...

But I'm still in a puzzle, its clear how I can edit the php file and upload, that I can do with no problem.
But why does the file come up in php? I dont want it to come up in a php form. I want it to appear like it does when the site is published and you go to view source. It shows you the file html file without the php scripts or js.

My problem is I cant edit the php file (template), because I find it difficult to understand the script and where they come from.

But if a go view source of the website I see what is happening and I can edit without the php file.

Or is the any joomla template that i can download without the php scripts?


Top
 Profile  
 
PostPosted: Mon Aug 18, 2008 8:50 am 
Joomla! Ace
Joomla! Ace

Joined: Mon Aug 22, 2005 7:53 pm
Posts: 1045
Location: Ilkley, West Yorkshire, UK
All the Joomla pages are created from php files, be they index pages or whatever.

They are no HTML files in Joomla that you can edit, they are created from the template/index.php files when viewed.

_________________
My sites: http://ilkleygardeners.org.uk Gardeners, http://wharfedalefestival.co.uk Music Festival


Top
 Profile  
 
PostPosted: Wed Aug 20, 2008 1:06 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Aug 11, 2008 1:28 pm
Posts: 6
So where can I edit the php scripts on my template? I have tried looking under site - modules.
For example, if I wanted to change the following scripts;

<?php mosLoadModulles( 'debug', -1 );?>
<?php include_once( $GLOBALS['mosConfig_absolute_path'] . '/includes/footer.php' ); ?>

Where would I do it?


Top
 Profile  
 
PostPosted: Wed Aug 20, 2008 6:01 pm 
Joomla! Ace
Joomla! Ace

Joined: Mon Aug 22, 2005 7:53 pm
Posts: 1045
Location: Ilkley, West Yorkshire, UK
Priscillam wrote:
So where can I edit the php scripts on my template?

Where would I do it?


Log in to your Joomla admin, then select Site>Template Manager>Site Templates
This takes you to a page with your installed templates, click the radio button to the left of your chosen template, then click Edit HTML on the upper right of the page.

This opens up the actual php file that controls your joomla pages. If you are unsure about what you are doing, SAVE a copy BEFORE you start, just copy & paste into notepad or something, NOT Word!

_________________
My sites: http://ilkleygardeners.org.uk Gardeners, http://wharfedalefestival.co.uk Music Festival


Top
 Profile  
 
PostPosted: Sun Dec 21, 2008 11:45 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Nov 27, 2008 11:32 pm
Posts: 27
Dragonrider:

Your tips were helpful and it pointed the way. I pasted my Google tracking code in the template page saved it and checked in IE and it was there. When I go to Google analytics to check on the tracking code status, it still says it is still not installed. :( Does it take a while to populate?

The developer who set up our site does not have a template created for each page. Just one template for the home page. How then, can I add tracking code so it tracks on all pages..... I am new to this so be patient. I am not a joomla developer. Just trying to fill in where our "no longer on duty" developer left off.

Thanks


Top
 Profile  
 
PostPosted: Mon Dec 22, 2008 8:16 am 
Joomla! Ace
Joomla! Ace

Joined: Mon Aug 22, 2005 7:53 pm
Posts: 1045
Location: Ilkley, West Yorkshire, UK
Check the template page again, the template you are using for your homepage should be shown as Default, that way, your site has a uniform look to it.

As long as the template you are using is et to default, this will be used on each and every page your site displays.

Google, yes, as far as I know, it does/can take some time to re-populate a changed page.

_________________
My sites: http://ilkleygardeners.org.uk Gardeners, http://wharfedalefestival.co.uk Music Festival


Top
 Profile  
 
PostPosted: Mon Dec 22, 2008 9:14 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Nov 27, 2008 11:32 pm
Posts: 27
Thanks for the tips.

All things working now. Had code in twice also and was not looking at the correct analytics pages.

Thanks


Top
 Profile  
 
PostPosted: Thu Aug 22, 2013 6:29 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Sep 19, 2012 10:07 pm
Posts: 34
This is one of the biggest problems with Joomla. They claim to be fully open-source but it is virtually impossible to edit any html files. If you ask anyone they will say its all in the PHP file. First off, PHP and html barely have anything in common with each other and second you can view the index.php file to be that the required code is NOT in there. IF you use Firebug or Inspect Element you can see that there IS an html file containing the code necessary to make amy of the changes. But you simply cannot find this file anywhere in your ftp folders and definitely no in admin. It's a ridiculous limitation of Joomla and probably why most serious developers are turning to Drupal.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 



Who is online

Users browsing this forum: No registered users and 13 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