Hot answers tagged

15

There isn't really a 'better way' than that. The only other option is to check whether you're on the homepage in your template file. To check if you're on the homepage you can use the method described on the docs here: http://docs.joomla.org/How_to_determine_if_the_user_is_viewing_the_front_page and do something like: <?php $menu = JFactory::...


5

In the JED there's also a "blank" component that lets you publish a menu item so you can place only modules. http://extensions.joomla.org/extensions/style-a-design/personal-layout/17363


5

I agree with Jeremy, you could simply use an <img> tag and insert the filename using PHP. However, if for some reason you want to read the file using PHP, try using readfile(). In addition, you can use getimagesize() to get the correct mime type and insert it dynamically. That way you're not limited to using one file type: $image = JURI::base().DS.'...


5

what steps would you take to ensure that the look and feel works in synergy with Joomla and other templates? There's no way of knowing what will, and what will not, be supported in a template so my advice would be to not rely on a template to style your component at all. It is impossible to ensure the look and feel, that it ultimately decided by the ...


4

I wish there was a solution to this but unfortunately there isn't. It would be great if we could all develop extensions that would integrate with all templates out there. You would simply be best making use of the Bootstrap classes and if the style doesn't integrate well, then the user can simply create a Template Override for your component. Just be sure ...


4

Currently, there is no such standard. The closest thing is indeed the Bootstrap classes. What I usually do is making sure it works in Protostar and hope for the best. There was once sort of a standard but support for it was low and the documentation was bad. It was basically just a list of ids and classes used by core.


4

Setting the header and trying to process the image directly is really unnecessary. This will produce the result you're looking for: Your second code block should be as follows $input = JFactory::getApplication()->input; $layout = $input->get('layout'); If (isset($layout) && $layout == 'show image') { $image = JURI::base().'files/images/icon....


4

You can have multiple template layouts in your index file. <!--Layout 1--> <?php if ($BConfig->html=='layoutA') : ?> <jdoc:include type="component" /> <?php endif; ?> <!--End Layout 1--> <!--Dynamically Generated Layout 2--> <?php if ($BConfig->html=='layoutB') : ?> <jdoc:include type="modules" name="...


4

The intro image is generated in the JLayout layouts/joomla/content/intro_image.php. You can override this in your own template in /templates/your_template/html/layouts/joomla/content/intro_image.php. Just copy the file there and adjust as needed. I think you should be able to generate a link there. To generate the link, you can use JRoute::_(...


4

You will need to create a Template Override for the article and category views. This may not be a preferred method, however it's what I would personally do. Category view: So once you have created your overrides for both views, in the category view, add the category ID as a class to the element for the title. For example: <div class="id_<?php echo $...


4

You can just duplicate your blog.php override and rename it (e.g. shop.php). At that point it will be available as an alternative layout for Category Blog. You can also add child layouts, like shop_item.php and then reference these from shop.php so you can style each item rendered in the category view.


4

I think you might have got muddled up with the template. If you're trying to override the view for the front-end of your website, you need to copy the view files to the front-end template. By default, it will be Protostar, not Isis You have 5 different views with the com_users component: Login Profile Registration Remind Reset So if you want to override ...


4

You have to use a more specific CSS selector in order to target only the main image, and not all images added to an article. The main article image (added through the "Images and links" tab in the article editor) are usually displayed within a <div class="item-image">, so you can simply change your CSS to target this image only: .item-image img { ...


4

Edited to add subform field type-specific answer: Having looked at it properly, attaching your own layout to the subform field type is super-easy. Create a layouts folder in the same parent component folder (site or admin) as the XML file, and put your layout in it: -com_myComponent - controllers - layouts - mylayout.php - models ...


3

That is because you haven't created the appropriate CSS support for 3 columns in your template. For example, at the home page (or whatever it is this page: www.scottiev.com/R ), if you want to show the 3 blocks in a 3 column fashion, then you need to add something like the following css rules in your template's css file. .span4 { width: 33%; float: ...


3

It is possible to create an override for the edit params layout only for the com_content component. In general the JLayout system will search for overrides in the following folders, with priority order as shown: 1. templates/mytemplate/html/layouts/com_mycomponent 2. components/com_mycomponent/layouts 3. templates/mytemplate/html/layouts 4. layouts There ...


3

One way to do this is to create your master module and put it in a custom module position, for example "master-position". Then create a new Custom HTML module for every location you wish that custom module to be placed, by using the actual template position you wish to load the module in. Then use {loadposition master-position} as the only content in the ...


3

I am coming back here to post an alternative suggestion, after I came across an extension that could help with site changes, updates, modification, including template change. The extension is called StageIt and what it does is adding staging capabilities to Joomla. So with this extension you can create/sync a development environment right from within your ...


3

You should not copy the full view folder, only the template files of a particular view, that you want to override. So for example, the following file needs to be copied: administrator/components/com_users/views/user/tmpl/edit.php and placed in: administrator/templates/isis/html/com_users/user/edit.php The difference here is that you should not include ...


3

From the link you provided it is obvious that in your template there IS NO article-separator HTML element. From the name of your template, 'favourite' I guess it is one of free templates from FavThemes, and it is obviously of not so great quality. Anyway, you can quickly add following CSS rule at the end of file /templates/favourite/css/template.css ...


3

The above code will try to get the layout value from request parameter "layout". If there is no request parameter found, it will use the default value which is "edit". If you want to override the default value, send "layout" parameter as part of your request parameter. It could be a hidden field in your form.


3

If you mean the intro image that's used in intro_image layout, use the same check as in the layout: <?php $images = json_decode($this->item->images); ?> <?php if (isset($images->image_intro) && !empty($images->image_intro)) : ?> <div><?php echo $this->item->introtext; ?></div> <?php else : ?> ...


2

Getting all that functionality with a plugin will be difficult. The xml form system Joomla uses for its forms/tabs is pretty complex in how it builds itself. Also to my knowledge there is no key "events" at stages that will let you change what form XML may be loaded (that and a Joomla update that renames a couple things or adds another field would ruin it). ...


2

Stupid, very similar, but fairly easy solution: Create a article category Leave it with no content (articles) Create menu link to it Assign your modules to that menu link You might need to turn off some details to be hidden for that category in the category and/or menu item parameters.


2

First of all, the admin template in your screenshot is the default Joomla 2.5 template called "Bluestork", and it's not made for Joomla 3. Joomla 3.x comes with a new default template called "Isis", so the first thing to do is to set "isis" as default admin template in Extensions > Template Manager: That will probably solve the problem, but if it doesn't, ...


2

It is quite simple, actually. Find a beautiful template on the web, then upload it to your site, then modify the category, or categories, that you're listing, to use that template in the backend: Administrator Menu: "K2" -> "Categories" -> "Edit Category" -> "Category Item Layout" (Tab on the right) -> "Select a template" Or you can create your own ...


2

The best way for make your own version is making an override. First, here some docs for make the override step by step: https://docs.joomla.org/J3.x:How_to_use_the_Template_Manager Now you need create an override in the column: Components > com_content > category You can find the files in: yoursite/templates/yourtemplate/html/com_content/category/...


2

If you follow the standard conventions, edit.php will be used for the form layout that allows you to edit an item, and default.php will be used for viewing an item as well as viewing a list of items. Typically in Joomla, you will see two types of view folders: singular and plural. The plural version (let's call it "articles"), will just have a default.php ...


2

The best way for make this changes is making an override. First, here some docs for make the override step by step: https://docs.joomla.org/J3.x:How_to_use_the_Template_Manager Now you need to create an override in the column: Components > com_search > search You can find the files in: yoursite/templates/yourtemplate/html/com_search/search For the first ...


2

Best option will be if you use Mozilla Firefox, and then install the add-on extension WebDeveloper. That extension will help you a lot with discovering where are you on your HTML code, which CSS class/id is assigned to that specific line, and then easily you can edit your CSS code and see in "live" what you are getting by changing parameters. At the same ...


Only top voted, non community-wiki answers of a minimum length are eligible