So I want to create a new module position in Joomla 3! I know you add the position name in the templateDetails.xml of the file. But what next? Do I need to add css to the styling of the template? Also what next, do I need to add more code to the index.php file or how can I do this? I have searched the web for some help but it seems as if the tutorials havn't been updated because some of the files they are describing, like for example lib/framework, I don't have that in my template? ANy help greatly appreciated!
I am not sure i got your problem properly, but
if you want to just create module position, you need to do 2 steps: define position in templateDetails.xml and insert jdoc:include code in template's index.php like you did in your code above, thats all. By doing this you define positions where your modules could be displayed.
Then if you want to add module, you should go to Joomla administrator panel -> module manager and create module, choosing position you created.
Related
I need to create a new section as same as manifacturers. only its name should be "authors".
I tried to make it. I changed databases, I changed files and created new files as like as "manifacturers". But It couldn't work than I got it: I can't make it without any help.
What should I do? Which document should I read to do this?
you need to do little bit of research bro..
you can go this link
http://www.packtpub.com/sites/default/files/9781783280377_Chapter-01.pdf
or
How to make a simple module in OpenCart? Example getting latest posts from Wordpress and showing it in OpenCart?
What I'm trying to do is create a submenu (in Joomla! backend) with below code but it does not work.
JSubMenuHelper::addEntry(JText::_('test'), 'index.php?option=com_test&controller=test', $controller == 'testcon');
I have attacted a sample pictures here. It explains what type of menu I want.
sample menu is here. check this picture
Thanks!
JSubMenuHelper is designed to be used in the Joomla! Administrator section, it's not made for the frontend.
If you really want to get to it, you need to include the file:
/administrator/includes/toolbar.php
Also you will have a bunch of missing CSS (js maybe also) files that you also need to include (form the admin template folder)
But I see no reasons what you want to use JSubMenuHelper in front-end. I would strongly advise against using it.
You should create menu and (submenu) in Admin Panel, but I think you already know that :)
Later you add look and feel with CSS.
I think you should do ti with CSS not PHP.
When i searched about it, I found this file on this path:
app/design/frontend/BASE/default/template/catalog/navigation/top.phtml
But when i do any sought of change in it, it didn't work or not show any change. I think I am working in wrong file. What I actually want to do is to add thumbnails to menu at frontend.
I am new to magento. Please help me in this regard.
Best way of knowing path of any template file is : Using Template path hint
Goto Admin->System->configuration->Developer
Then select main website option from Current Configuration Scope dropdown on left hand side.
Then enable template path hint.
Navigate to the front end refresh and u can see the path for various blocks.
For better understanding of the template path hint try this video tutorial.
Actually the top.phtml file is in app/design/frontend/base/default/template/catalog/navigation/top.phtml as you have mentioned
Go to admin->system->configuration, now on the left panel click on design and in the Package area see the Current Package Name.
This is the current package you are using. Say this is... "default"
Now in the Themes area, check the Templates field.
This is the template of the above package that you are using. Say this is "modern"
If the field is blank it means you are using the default template.
Now the top.phtml file you need to edit is in or should be copied to app/design/frontend/default/modern/........
Paste it there and edit it.....
The reason for copying and editing is to keep a backup of original base package.
Try to flush magento cache at backend: "Configuration => Cache Management"
You maybe want to check if you have 'base' configured in the theme settings in Magento. Maybe it's overwritten in another package.
You may want to look weather you have a different theme active app/design/frontend/<themename>/<themevariation>/template/catalog/navigation/top.phtml
see http://www.newsjournal3.com/12-magento/13-how-to-override-magento-top-navigation
you have to put the topmenu.phtml in the html directory
I want to use a template override for Articles in Joomla, therefore I am using
mytemplate/html/com_content/article/default.php
If I change anything in this file the changes do appear.
But as I want to use an extra .php-file f.e.
mytemplate/html/com_content/article/alternativeLayout.php
I am facing a problem. Because although I can select this layout on the article settings page - any Changes I make do not appear and still the default.php is used.
Any ideas what I am doing wrong?
In order for an alternative layout to be used, two conditions must be met -
You must select the layout in the article parameters
No menu item can exist for this item - the layout selection of the menu item will override the selection in the article parameters
It sounds like your problem is with #2.
EDIT
Duh, I missed the key part of using alternate layouts. In order to be able to use an alternate layout with a menu item, you have to create an alternatelayout.xml file and place it in the override folder. This will give you an additional menu item option that you select when creating your menu item. You should be able to copy the defailt.xml file and edit it for the new layout.
I created a visual tutorial for this as it was driving me mad for about two days until I figured out how to actually work it. You can find it here: Joomla custom article template
I hope it helps others solve this faster than I did :-)
PS: all the credit for the article goes to Brent!!
the name of the files must be the same. The override must have the name "default". So its:
/yourTemplate/html/com_content/article/default.php
/yourTemplate/html/com_content/article/default.xml
/yourTemplate/html/com_content/article/default_links.php
had exactly the same problem, this solution solved it.
Also, note that any override filenames must be lower case. For example, "AboutPage.php" won't work.
I trying to write a drupal module. I'm following book "Learning Drupal 6 Module Development ". I have created a new content type (mybio)in module. I'm able create new node and edit node for new content type , it works fine but I'm not able to see new fields for mybio content type when viewing node.
I have placed mybio_info.tpl.php file in module folder and theme folder but nothing works.
Have you implemented the load hook and view hook?
Whenever you create new content types, you need to provide all hooks for changing / loading nodes, such as hook_delete(), hook_insert(), hook_load(), hook_update(), hook_validate() and hook_view().
If that doesn't work, are you sure your template is being used? If not sure, replace all its contents by something simple like '1' and see if that's being shown. If you don't see that, then it's not being used at all; try renaming to node-mybio.tpl.php.
For template naming, take a look at the Core templates and suggestions handbook page.
It looks like you did not implement hook_theme, so the system has no idea you are providing it with a template for this content type.
You can check whether this is the problem by displaying the theme registry using devel.module, or go further and use theme_developer module to check which template is used for everything on-screen.