Ordering of webparts inside webzone issue - sharepoint

I have a page layout with a webpart zone in it. As per the requirement there should be 4 custom webparts in that webzone.I have placed the webparts in the order as per the requirement. But when I try to create a new publishing page with this layout, I could see
that the order of webpart I have given in layout is not same as in the newly created page. So once again I have to order these webparts in edit mode .Changed the zone index property for the webparts in layout but it’s still not coming in order in the newly created page.
Ex:
Ordering of webparts in the page layout.
Ordering of webparts after the page is created using the layout.
Any help for fixing this ordering issue will be greatly appreciated.

So you have preloaded the web part zone in the page layout with the four web parts in the order you wish? If so and the order is not correct then you might have to create an event receiver that can trap when the page is being created and then add the web parts manually via code. that would at least ensure the order but seems overkill to me.
If the web parts are included in the web part zones within a page layout though, they should be added in that order when the page is created.

Related

SharePoint 2013, change welcome page layout when a sub site is created

we have a custom page layout, and we want this:
When a new sub site is created by users, we want the default.aspx, AKA welcome page to be based on our custom page layout.
How can we do this?
Two options:
1) Create a custom web template and define a module for the welcome page. This obviously only works for that custom web template, but does not require code.
2) Create a web event receiver (e.g. WebProvisioned), apply it to site collection. In the code behind set the page layout of the welcome page to your custom page layout. This works for any template, but requires custom code.
Option 1 only works in a farm solution, option 2 should also work in a sandboxed solution I guess.
I believe you want this OOTB (Codeless).
Go to page (you want to make home page) set the layout. (you custom
layout).
Set this page as a home page.
Remove all data (lists, libraries, pages). except this page.
Save the site as site template(_layouts/savetmpl.aspx). If you are not finding the save as template option. Write the url.
After saving the template, you can
use the same template for all your sites. For creating subsites,
this should be add in list site template in settings. Let me know, I
can explain you more.
Thanks

content query web part in page layout sharepoint

Is it possible to add a cqwp in a page layout?
Ive tried to move the webpart from the page to the page layout used in the page. But In the second case i dont see anything.
Anyone have an idea?
Thanx
It is supported to add instance of CQWP into Page Layout.
Possible reasons why CQWP results are not visible:
Javascript/CSS that affect the visibility of web part
Verify source settings for web part. In case if page and page layouts located on different sites and the source property is configured to Show items from the following list or Show items from the following site and all subsites then this could be the reason. In both cases for for source property the relative path could be specified.

Navigating sharepoint with a treeview

I'm trying to replace the navigation on our sharepoint site with a treeview. It's a large site with up to 4 subsite leves in places. All I need it to do is
show a consistent structure from page to page
show only sites and pages
The default sharepoint treeview seems to do neither of these things (doesn't display items from the parent site, includes document libraries but not pages).
Does anyone have any idea how to achieve this? We're using the publishing site template throughout if that makes a difference.
I've tried binding the tree to the datasource the quick launch uses but I guess from the error message they expect differently named properties.
You cannot do it using the default property of sharepoint.
But I had also almost the same requirement. I did this task by the following way
Store all the links in an XML file.
Create a webpart for reading XML file and create menu
Open the masterpage using sharepoint designer and comment the lines which render the top navigation and place the new webpart there
Inherit this masterpage in its subsite.
For multi level quick launch the below link will help you
http://blogs.msdn.com/sharepoint/archive/2007/04/26/customizing-the-quick-launch-menu-adding-fly-out-menus-to-sharepoint-navigation.aspx
If you want more help, pls ask me, I can help you

SharePoint error relating to page layout after creating site from template

Inside SharePoint I've previously created a site template by appending _layouts/savetmpl.aspx to the end of my site and new sites have been created correctly and work as expected.
I've now come to do the same thing again and yet this time the new site is throwing an error relating to the page layout.
The error is:
This page is not using a valid page layout. To correct the problem, edit page settings and select a valid page layout.
When I try to select a different one, there is only the one to select. This page layout is in use on other sites and they render fine.
Has anyone else seen this issue?
All the best
First, if you append the _layouts/savetmpl.aspx tho the url, i suppose you dont have it in the Site Settings options, so you are using a Publishing site. This is because Microsoft doesn´t support this option (save as template in publishing sites). And they dont support it because it has some bugs, for sure.
So, I would recommend not using this option in important sites, or if you plan to ask support to Microsoft in the future.
However that error indicates that the page layout or his associated content type (ou parent content types) are not correctly installed in the site collection. Are you using your own (custom) content types? Please confirm if the ID of the associated content type (something like 0x0100C6739B7D12DE419aA2F9A2F96CC26818) is exactly the same in the Page Layout on working sites and in the not working sites.
Hope it helps
Do the sites/site collection where the templates working have all the same features enabled as teh sites/site collection where the template isn't working?
Can you check the server logs? <12 hive>\LOGS
Did you add a custom page layout, use it, and then forget to check that "save content" checkbox when you saved your template?

Page Layout does not appear in the page layouts list

I have a feature that deploys a few site columns, a content type (inheriting from Page Publishing Content Type) and a page layout based on my content type.
Everything is fine on two tests, performed on different servers, but on the third server, although the feature is being activated correctly and I can see the site columns, content types and the page layout in the galleries, I cannot create a new page based on my page layout because the page layout does not appear in the list of available page layouts.
On all tests I have used the administrator account.
Does anybody have any thoughts on possible reasons for this?
Thanks.
Did you have a look at the "Page layouts and site templates" page under Site Settings? On this page you can enable an option that limits the available page layouts to a specified list of page layouts.
I have worked on a project where we needed to limit the page layouts available on a custom site definition. We implemented this in a feature, that enabled the "limited page layouts" option and populated the list of available page layouts upon activation.
If this is the issue you are having you could simply turn off this option in the web interface or add the new page layouts manually, but you could also consider implementing a feature receiver that automatically adds your custom page layouts to the list of available layouts.
Thank you all for your answers.
What actually happened is that the page layout was, for some reason, deployed as a Master page and not as a Page Layout. The admin has manually changed this and now it works.
This is just an educated guess but check to see if the Page Layout is waiting to be checked-in or approved.
In my case the path for the layout was wrong so the layout itself ended up in a different location, when I corrected that i was able to see the results.
I had added files manually and it did not appear.
When I edited properties of that layout page from UI and saved it, it appeared.

Resources