Joomla 1.5 2 categories, 2 layouts - templates

I have two categories that need their own layout. Right now it looks like both categories are using template/html/com_content/category/blog.php, and I can't for the life of me figure out how to switch this to a different layout from the menu item layout selection.
Joomla 1.5
Stuff I have read:
http://docs.joomla.org/Understanding_Output_Overrides
http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
No matter where I place extra files within ...my-template/html/com_content/category or ...my-template/html/com_content/category/views/[category]/[tmpl]/, no new layouts show up from the layout selection dialog. System debug doesn't seem to print out any useful templating info either.
WHAT DO?

You put layout overrides it the html folder of your template not in the core folders. Look at beez5 for examples of layout over ride and also for an alternative layout which is used in com_contact.

Related

Sitecore 8 Reset Layout issue

I need to add a rendering to all the pages. I thought adding to a Page Basic template that I have and is being inherited for all the page templates.
These page templates have different renderings and layout so the presentation is overridden. On top of that, authors have been adding more renderings to the pages themselves.
Any ideas on how to add this rendering to all the pages?
Thanks
I would use sitecore Powershell to accomplish this. After traversing the tree you could add the rendering using the code in this link.
Just make sure to backup you db, just in case!
https://blogs.perficient.com/microsoft/2016/06/sitecore-powershell-add-rendering-to-item/

Sitecore 8.1 Header and Footer Composite Component

In Sitecore I have created base Template & Renderings for "Header, Top Menu, Logo, Search ,Login Button…etc that comes in Header across all Pages of the Site."
Also the same template & Rendering is using in other website so we can't set value in Standard field.
Now the problem is “suppose we have 100 pages in a Site then each page we have to go and add/update rendering & data source.
Is there any way that a “Header rendering” contains child rendering and by placing “Header rendering” render all its child renderings.
Header Composite Component ===>
Logo Component
Top Navigation Component
Search Component
There is a composite component module on the Sitecore Marketplace :https://marketplace.sitecore.net/Modules/C/Composite_components.aspx?sc_lang=en
This fill's your requirements exactly.
It works by creating a "Composite Component" item, then you add your renderings for your header to that component. E.g. Logo, Navigation etc...
Then in the standard values of your page templates, you add a new Composite Component rendering and set the datasource to the component item you created.
The module will then inject the renderings from the component item presentation into your current item. So you only have to update a single place to update all pages etc...
I have this running in a few production sites and it works well. It even supports the Experience Editor.
I don't think there's a solution out of the box. SxA solves this with Partial and Page Designs at site level. Just wrote a blog about it:
http://reinoudvandalen.nl/blog/sitecore-experience-accelerator-partial-designs-and-page-designs/
I also made something that might help you: Partial Layout Presets
http://reinoudvandalen.nl/blog/sitecore-partial-layout-presets/
It even allows you to store presets per site, but keep in mind that it injects composed layouts. If you modify the preset then it does not get applied to the pages where it was injected (though you might be able to pull something of with a shared datasource per site).
Lastly the obvious solution would be to create a page template per site so you'll be able to have standard values per site.
You may want to take a look at using Placeholder Fallback.
This will allow you to add components and renderings to a top level page and then the child pages would "fallback" to using the renderings inserted into the placeholder of the top level page in the item hierarchy. The editors can also insert page specific renderings on each child page if required.
If you do not want to custom code and only out of the box features then you could use Devices. You can find more information in the documentation about Set up a device layout. Once the device is created you can specify a different default device per site:
Now when you open the Presentation Details on the __Standard Values of your templates you can specify a different Layout or Renderings per device, i.e. different ones for AltSiteDevice

Where to put grid layout in SUSY/SMACSS structure

say on the about page you have 3 column grid and on the home page you have a four column grid, in which file within the css architecture should these styles be placed to layout these pages, should each page have a layout css?
I, personally, only use one layout file and put whole pages layout styles here, more easier to maintain.
Good question. However, adding a specific css file for specific pages would greatly negate the purpose/power of SMACCS. All of your layout structure should be in one 'layout' css file or better yet defined within a custom (or not) mixin which you can call based inside of a module or overall layout.

Joomla Template with different layouts for different sections of the website

I am very new with Joomla, and I have to create a template for joomla 3.0 based on a design given.
I have read a lot of manuals and tutorials about "simple joomla" templates that explain how to organize the directory structure, xml file, index.php and so on.
But I don't see where we can define different layouts for different sections of the website, for example:
Layout for the home page
Layout for articles listing (on search for example)
Layout for the article itself.
I am sure there must be thousands of tutorials regarding that point, bu I simply cannot find it.
Thanks for any advice.
I think one of the concepts you may be missing is "Template and Layout Overrides".
Components (the elements of Joomla! that create the main section of any given page) control the layout of any of their views. To change these a template need to create a matching override for the specific view.
A similar process is used for "Modules" the smaller elements of a web page (e.g. side-bar advertising or widgets).
Have a read of these articles:
How to override the output from Joomla! Core
Understanding Output Overrides
Converting a template for Joomla! 3
You may also want to look at the "Joomla 3.x Template Overrides Example" that You!Joomla created a while back.
Finally given that Joomla! 3.0 is a Short Term Support version (and 3.1 is due any day and so on) you will probably be advised to use the "Template Overrides in Joomla! 3.0" forum for specifics.
If you look in Isis you will see an example of using conditions to change he layout, that is how the control panel is so differen than the rest of the admin. You can either do it all in one file or you can have separate files

Category Item Layout in Joomla using K2 Component

I am new to the K2 component in Joomla, and am having a problem with the category layout grid.
I am using the K2 Content Module to pull items from a specific category. The category layout grid settings call for three columns for the leading, primary and secondary sections. Yet, the display remains in one column.
In fact, the module does not seem to respond to changes in the category layout settings at all, as images remain the same size regardless of setting.
Here are screenshots of both the category and the module page:
I have watched several videos on the issue and searched this site, and I can't figure out what it is that I am doing wrong.
Thanks for reading!
In case caching is enabled on website Clear the cache and see. Also check the menu item created for displaying the category.
The problem is that you don't know what you are actually setting.
Category settings (number of leading, primary... articles and their layout etc., see your first screenshot) do not apply to the K2 Content Module layout at all. That's correct.
Why? Category settings apply only to pages created via Joomla Admin -> Menus. You have to create a menu of item type "K2 Category" and that will create a page where your category settings will be applied. No other page will be affected by your category settings except this one.
K2 Content Module layout can be changed only via CSS and its template that can be found in /modules/mod_k2_content/tmpl/Default/default.php on your server. In the settings of the module itself, there is no layout settings as you can see in your second screenshot.
If you want to modify the K2 Content Module layout, follow these steps:
Make sure you'll override the module's template first. Just copy the
whole "Default" folder including its default.php file into
/templates/your_template/html/mod_k2_content/ and you'll be ready
to go.
Optional step for multiple module templates and layouts - You can rename the "Default" folder name to something different as "news_template". Now, in the module settings, see the "Select sub-template option" - you can choose your newly created one.
In the default.php file, change the HTML as your layout requires.
Change or write your own CSS for the module. You can do it either via k2.css file or your custom template stylesheet.
There is no "click-way" to choose the layout of the K2 Content Module, sorry - this is the only way.
// Update
I didn't notice that this is so old question but it hasn't been answered properly - so finally, this is the answer. The problem is still current, K2 is still widely used and this applies for all Joomla versions from 1.5 to 3.x