Current time: 05-17-2012, 05:32 PM Hello There, Guest! (LoginRegister)
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to edit index.php
02-21-2012, 04:21 PM
Post: #1
how to edit index.php
Stan,
Can you please advise on how to edit the index.php page.
Find all posts by this user
Quote this message in a reply
02-21-2012, 04:50 PM
Post: #2
RE: how to edit index.php
Hi,

You can't edit index.php file directly, but you can edit it's PHP template file located here: app/views/_layout_default.tpl.php
Visit this user's website Find all posts by this user
Quote this message in a reply
02-21-2012, 08:18 PM
Post: #3
RE: how to edit index.php
ah right. Okay. Well my issue isnt visable in any of the files in their. How do you fix this: When you choose to select the feature option of a product, the product appears four times on the home page. In the code it looks like it is the same four times over.
Find all posts by this user
Quote this message in a reply
02-22-2012, 02:11 PM
Post: #4
RE: how to edit index.php
Featured products are displayed on Home page by JavaScript code <script src="/category/flag/1/ajax" type="text/javascript"></script>
Probably when you edited content of your Home page using WYSIWYG Page Editor in Admin Panel, you copied this code several times, because JavaScript is invisible in WYSIWYG mode. To check the code you have to switch Page Editor to HTML mode and if you see several instances of
<script src="/category/flag/1/ajax" type="text/javascript"></script> just remove the redundant ones.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-22-2012, 02:29 PM
Post: #5
RE: how to edit index.php
okay. So i have looked at what I think is where you say the issue is Admin>pages>Home> switched it to html mode and attached is the code in there. The site in questions is shop.coastrunnersshop.com.au if this helps to shoe the problem


Attached File(s)
.txt  homeissue.txt (Size: 2.29 KB / Downloads: 6)
Find all posts by this user
Quote this message in a reply
02-23-2012, 01:45 PM
Post: #6
RE: how to edit index.php
what a mess you did there Smile My suggestion is to remove everything from there using HTML window of WYSIWYG Page Editor, then paste this code <script src="/category/flag/1/ajax" type="text/javascript"></script>, save it, and after that put your content (tile and text) again.

And please do not paste Google JavaScript code in the Page Editor, it's not a good place for that.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-14-2012, 03:25 PM
Post: #7
RE: how to edit index.php
Stan,
sorry it has taken me so long to get back to you. which text do I need to remove to acheive you last statment. Is it supposed to be in that app/views/_layout_default.tpl.php file? or is it some where else?
Find all posts by this user
Quote this message in a reply
03-15-2012, 04:48 PM
Post: #8
RE: how to edit index.php
You have to do it this way:

Admin Panel -> Pages -> Your Home Page -> Page Editor -> Click on "HTML" button (last button in the second row) -> in the "HTML Source Editor" window remove everything and paste this code:
Code:
<script src="/category/home/ajax" type="text/javascript"></script>
-> click on "Update" button of "HTML Source Editor" -> then "Update" button of the "Page Editor".

After this you can start adding text content to your Home page, but please be careful and don't mess it up again.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)
© 2012 SitesOutlet