I've downloaded the latest version of Orchard (0.5) and I've looked at the initial layout of the site. Looks good. But, it only allows me to edit different parts of it and not the actual layout of the page.... or does it? If so, how do I go about changing this?
Check out this link to understand the concept of layers and zones.
Basically, you can customize the zone (a place to put a widget or a place where content goes) layout of a particular page by matching it to a layer (using a rule defined in by the layer). The layer structure allows for inheritance.
You'll want to grab the 0.8 version when it's available Monday 10/25/2010: we did a lot of work around UI composition for that release, basically rewriting the whole UI layer. We're also writing new documentation for those features that you'll find on http://orchardproject.net shortly.
A theme can override the layout of the whole page or of any shape on it by just providing a new template or shape rendering method.
Related
I am creating a new footer sublayout in sitecore for use in multiple sites (we run a multi site environment). Currently a sublayout called StandardLayout is used, but I would like to change this across several of our sites to a new layout GlobalFooter.
The problem is that child items of the Home Page have overridden layout components, so what I would like to know is if there is an easy way to change the layout without losing all of the overridden components (as I expect that I may need to reset the layout in order for the flow down to occur)?
I am hoping to be able to just change the top level element (Home) and then have this flow down to the child elements, otherwise this task will become very long and tedious if I need to go through each item and change the presentation to use the new footer.
The icon circled in red in the image above indicates that the presentation has been overridden for that particular sitecore item.
To answer your question, directly, there is no way to apply an update of the presentation details of a template to templates that inherit from it that have had their presentation details changed without losing the changes.
The solution described in the blog post you linked to is the best solution for updating inherited presentation details in this manner. IMHO, I believe that this functionality should have been built into Sitecore long ago as a separate button on the ribbon, and you may choose to add one if you are so inclined. If you do not have the time to do so however, creating an admin page that you later delete from the site after using is a perfectly viable solution as well.
This post appears to detail a way that I can achieve my goal, basically I would create a admin page that does not publish and put the code in the blog into it to update the layout via a button trigger.
https://www.sitecore.net/Learn/Blogs/Technical-Blogs/John-West-Sitecore-Blog/Posts/2011/09/Programmatically-Update-Layout-Details-with-the-Sitecore-ASPNET-CMS.aspx
Working on a custom theme for Orchard 1.6. I've got my top navigation & recent blogs rendering exactly how I want it. However I want to create a footer that shows the navigation & recent blog posts in a different way. I'm using four zones across the footer and want to add widgets to them (navigation, recent blog posts), however I want the rendering to be different.
I can't figure out how to create a view that is used for these widgets JUST within these zones. The template override options shown in the Shape Tracing tool aren't specific to the zone I'm in so they'd apply to the ones in the body of the site (which I've already implemented).
Is what I'm trying to do even possible w/o some custom code (not just a view but some type of a new component) which I'm trying to avoid?
If you enable Widget Alternates, you'll get additional alternates that you can use, in particular depending on the zone name.
I am using orchard cms v 1.4 and developing some site content that is stand alone and does not use the standard theme. I would like to use some of the resources already declared in manifest files on the non-themed views. However they only render when I apply a theme to the controller or the specific view.
In my view I am including the following:
#{
Script.Require("jQuery").AtHead();
}
This only functions as expected when I include: [Themed]
as an attribute on my controller.
Any idea's on how to get this to work without creating a full theme for my stand alone pages?
Yes, see http://weblogs.asp.net/bleroy/archive/2012/10/20/writing-an-unthemed-view-while-still-using-orchard-shapes-and-helpers.aspx
What's important is that you use a shape as the model. Themed or not doesn't matter then.
I'm trying to add a image carousel to my CMS site and in the process learn about Alternatives.
I've go the following content types
BannerImage (TextField and a MediaPicker field)
ImageGallery (Container)
I've created a bunch of images, added them as 'Containables' to a new ImageGallery and
I then create a widget, put it in BeforeContent and it renders as an ugly list (default rendering)
I have been able to customize the images by using the alternative Content-BannerImage.Summary.cshtml, sweet.. so far so good.
BUT I'm not able to customize the rendering of the ImageGallery at all. The alternative
Content-ImageGallery.Summary.cshtml or .Detail or even Widget-Container.cshtml do not work at all.
The alternative that IS being used is Widget.Wrapper.cshtml which came with the theme I'm using. I'm not able to find the correct alternative so I can prevent the ImageGallery from rendering it's name/title (which it does by default from the Widget.Wrapper.cshtml alternative.
Any help is greatly appreciated and before it's mentioned... I've read http://docs.orchardproject.net/Documentation/Accessing-and-rendering-shapes which is a great doco, but I'm too dumb to figure it out :)
Ta
To create an alternate (not alternative) for a widget, you first have to activate the Widget Alternates module.
Once you have done so, create your widget, and activate the Shape Tracing module. Go to the page where the widget appears, click on the shape tracing button on the bottom right corner to show the shape tracing and select your widget.
You should now see a list of possible alternates for your widget. Select one and click the link to create it. Now you just have to edit it to your taste.
Depending on how the image gallery module you're using is working, the shape that you need to override to render the list of images. It is probably the List shape that you need to change. This article should give you a good starting point: http://weblogs.asp.net/bleroy/archive/2011/03/27/taking-over-list-rendering-in-orchard.aspx
I have requirements to have an "Editable" region underneath the header, but above the content of views. I have several pages that I need to do this.
Is there are way to insert a Page by name into a view? Is there a better approach?
What you need looks a lot like a widget: create an html widget, put it in the appropriate zone for your placement and in the appropriate layer for it to appear only in the relevant pages (don't be afraid to create a custom layer if you need to). You won't even need to write any code to achieve this!
Read about managing widgets in the orchard documentation.