"Change an item in the navigation? Sure I can do that in 15 minutes."
So I am trying to update the navigation on a site that I inherited only to find out that the previous programmer was a college student and was using this site as a project of some sort. Needless to say there are zero comments and the code calls function after function and I just can't follow the logic.
I am looking for a roundabout way to update the navigation. I tried using Dreamweaver to search through all of the files in the site and look for any files that contain the name of the page or the url (hoping to find some sort of included file). There was none. I did file text files that control the main navigation but none for the subnavigation.
There is no database.
If it helps here is the site. http://bit.ly/jbs639
And if you want to look at the interesting text file that is parsed to create the main navigation you can find it here: http://bit.ly/m3erna
Hmmm.... Interesting indeed. You have my sympathy.
One thing that I would look at... The file that gets parsed for the main navigation appears to be a simple delimited file. Sure, the delimiter is a rather unusual +++, but that choice means it avoids conflict with things like commas that might be desirable in the link text. It looks as if the last element indicates what type of resource is being accessed (file or directory, although I don't know what - if any - effect that has on the final output). It also appears that there are similar text files (in the framework/cfg/nav/ folder... which should probably not be generally accessible BTW) for the sub-menus. (E.g. the file stores.txt appears to contain the additional navigation items associated with the stores sub-navigation).
You don't mention which sub-menu you're trying to change. I suspect it is the "About TTO" one, which I can't find an entry for... but I'd look to see if there are any similar navigation text files in the /content/about/ folder.
Good Luck!
Of course it was as simple as a function that reads all of the files in the directory and the name of the file. I guess that in this case there was no shortcut.
Related
I would like to know if there is a way to change text in the code instead of using the admin panel? I have Filezilla installed and can access my site/files from there.
If I use the inspect element in any browser, I can see an HTML structure, but as I have understood there is no HTML document in Magento, right? So where do I go if I want to make a change to a text element on my site and I don't want to use the admin panel?
Most of the text elements are handled by Magento's language translation system.
Quite often, you don't have to mess around hacking templates, just simply add a line to the translation CSV with the text string exactly as it appears, add a comma and then the new text string you want Magento to display.
For example, if you're working with US English, you can use the following file in your own custom template package as follows:
app/design/frontend/default/your_package/locale/en_US/translate.csv
Let's for example, change one of the window shade bar titles in the One Page Shopping Cart. Add a line to translate.csv as follows:
"Billing Information","Billing Address Information"
How this works, in the template the following line normally displays the title:
<?php echo $this->__('Billing Address') ?>
This code snippet $this->__('Billing Address') is a call to Magento's language translation system. It reads the translate.csv file finds Billing Address and changes it to Billing Address Information when it assembles the page html.
Lotta people out there have made changing text like this far harder than it has to be.
Hunting down the proper template, changing the text, finding the template got messed up, or trying to remember after the fact what was changed.
VS.
Changing a simple central file that contains all the text string translations... Often only by adding a new line to the file
Magento actually makes this very simple.
Thank you! So magento stores all text in .csv? or just the stuff that needs to be translated? I'm making a search for .csv via Filezilla but I only get two languages (the site is translated to multiple languages). Should I be looking somewhere else?
I am building a new website in Joomla 3 and here is some really weird behavior i just stumbled over…
I get a wrong URL in Menu Items and read more links, saying, e.g
website.de/weOffer/drinks/Read%20Private%20Message/beer.
I would give you a real URL, but the project is still under development and classified.
The /Read%20Private%20Message/ part in the URL obviously does not belong there and gets inserted by joomla by default. The result of course is fatal. Not only the menu items aren't working, the read more links aren't either, all leading to 404 errors !
To go into more detail, here is what i have set up and what i have found out so far.
I have made a category blog, where articles are listed, each with a read more link in it, which works as expected.
Now each full text article should have its own slideshow and a couple of other modules, like a facts box in it.
Thats why, the article itself must show up as a menu item as well, so in the module manager i can select, that a specific slideshow module is used in this specific article only.
Therefore i have created menu items with the type of single article that links to the defined Article.
The main menu represents the page tree, each category blog has links to single articles as children. Some cat blog have cat blogs as children and then articles.
This setup works as expected, as long as i don't set the article menu item as a child of the category blog of the category the article itself belongs to.
Example:
MENU =
we offer(catblog) -> drinks(catblog) -> beer(singlearticle)
ARTICLEMANAGER
beer(category: drinks)
RESULT: wrong URL as above.
I can fix the error, by using rebuild in the menu manager, but thats only half way done. The menu URL is getting fixed, but than i have to go into the article itself, remove the read more and insert it back again, because the read private message doesnt get removed, even when i clear my cache. When i am done re-saving the readmore link, everything works like normal, until i save the article menu item the next time. Read Private Message bug is back again, up for another round.
I am a SuperUser, so i suspect i have all rights possible in joomla...
This must have something to do with Search engine friendly URLS (SEF), since it only occurs when i have SEF and mod rewrite turned on. I am using the default .htaccess file without any changes.
Here are some people with a similar problem, but no satisfying solution is given:
http://forum.joomla.org/viewtopic.php?t=802045
http://www.jevents.net/forum/viewtopic.php?f=31&t=19620
I have read about migration and update errors, leading to the same problem.
I migrated manually (sql backup, change of some path in config file) from local apache to 1&1 apache server, both running PHP 5.4, so i doubt that this is a migration issue Plus the problem also appears when i create new articles and menu items (under the parent category).
Changing aliases in both menu items and article itself does not have any effect.
I really hope somebody could give me a hint, or maybe even just confirm that this is a bug If this is designed behavior than whats the reason for it ?.
I am quite frustrated about it and i don't have that many options left since:
1. SEF is a MUST (to my client)
2. Changing the menu tree structure, so that the linked items are no longer children of their cat block parent destroys my breadcrumbs.
3. rebuild and change every menu item and article manually 2 to 3 times is time consuming, error prone, annoying and i don#t want to sell a product to a client like this, since they want to maintain it for themselves as far as posiible.
Your help is really appreciated !
Greets paad.
In Xcode 5, can you sort the list of code snippets?
I've made one of my own and it's down at the bottom. I'd rather have it be up at the top.
One cannot automatically sort the snippets. One can go into the snippet file and reorder the snippets. System snippets are always presented first so to move a user snippet to the top one would copy the data for the snippet between the dictionary tags (....) to the top of the system snippets.
How to do it
Be advised that it is likely one would lose the ordered snippets when Xcode is upgraded so this should be considered but here is the way to force the issue:
Backup the affected system snippet file
(/Applications/Xcode.app/Contents/PlugIns/IDECodeSnippetLibrary.ideplugin/Contents/Resources/SystemCodeSnippets.codesnippets)
for safety
User snippets are stored as a series of xml files located in the
following directory ~/Library/Developer/Xcode/UserData/CodeSnippets/
Create a user snippet
Go to the user snippets folder and open the file just created with a
text editor (these are just xml files so TextEdit, TextMate, et al
will do)
Copy the user snippet between the ... tags
Paste the user snippet data into the system snippet data at the top
Why you should avoid doing it
Changes will likely be lost when Xcode is updated
You can and should create a shortcut that will allow you to type the
entire snippet into code easily
Your title of the snippet is also searchable (making the snippets easy to find)
What is the alternative
I suggest you open an enhancement request at http://bugreport.apple.com to ask Apple to make a sort option available.
I am working on Joomla 1.5 right now and was wondering if there is a way to figure out, from the UI, on which module this is part of ? Eg, there is a picture viewer on the home page and I want to know which module is triggering it.
I do it the hard way no, where I goto all modules and check if each had anything to do with it. But was wondering if there is an easier, faster way.
Thank you :)
In Joomla 1.5 you can simply add ?tp=1 to the url to force the system to show you the template positions. You should just about be able to make out the name of the position in question. From there go to the module manager and filter the list by position.
It shouldn't be too difficult to figure out - the module will have rotator, slideshow or similar in its name/type.
It is probably set to show on the home menu item only too.
In my experience, this is an issue with most CMS - Drupal, Wordpress, and Joomla included. And it can be very frustrating. My approach is normally:
Search the module listing for something likely. So, in your example, I'd search for 'picture', 'viewer' 'gallery', etc. and, hopefully, a likely-looking modue would turn up in the listing. Usually, viewing its settings screen makes it obvious whether that module is the relevant one or not.
If that fails, I usually look at the source (easiest with firebug), and identify something that is likely to be fairly unique - e.g. a class name or a specific attribute in the markup. Once I have that, I resort to find/grep on the command line to identify the origin.
If you find yourself with a lot of extensions, and this becomes a regular problem, you could think about modifying templates to include a comment that identifies their module.
After tinkering and modifying a GUI I have been working on for some time I ended up with a group of EditControllers and Radio Buttons that I do not need any more, so I would like to get rid of them. However, if I simply delete them from the GUI edit, I get assertion errors. How am I supposed to get rid of these elements?
You need to remove all code from your program that refers to the deleted controls. For each control you want to delete, take its ID and search the source for statements that refer to it.
Start like this:
Check the ID of that given control. Copy it. Now remove the control from dialog resource.
Ensure that ID is not used by other dialogs. If not, you can use following.
Delete that ID from resource.h.
When you compile it, you'd get error (around GetDlgItem, DDX_Control etc). Remove or comment them. Remove appropriate CWnd-derived variables (like CEdit, CComboBox etc).
You are done!
If given ID is used by other dialogs (check it from Resource View's context menu Resource Symbols...), then you cannot directly remove it from resource editor. You, however, need to remove it from appropriate implementation file (of CDialog/CPropertyPage-derived class).