OVH Cloud OVH Cloud

[SPS 2003] partage d’un modèle de lise entre plusieurs zones.

4 réponses
Avatar
Damien Minart
Bonjour,

J’ai créé un nouveau modèle de liste à partir d’une liste que j’ai personnalisée.
Je peux maintenant créer de nouvelles listes en utilisant ce modèle.
Néanmoins cela n’est possible que dans la zone du portail ou j’ai créé le modèle, je ne peux pas m’en servir dans d’autres zones.
J’aimerai savoir s’il y a un moyen de rendre ce modèle accessible à d’autres zones.
J’ai bien essayer de faire hérité le modèle de zone de la zone parent mais j’ai alors deux zones complètement liées et identique (en plus ça ne correspond pas exactement à ce que je veux faire même si c’eut été mieux que rien…)

4 réponses

Avatar
EROL [MVP SPS]
Bonjour,

J'avais vu ceci, mais jamais testé:

Copying Lists Between Sites (SPS2003)

Description:
I had the question from a site administrator who wanted to copy a list from
one site to another. After a few false starts I finally realized I was going
the wrong way. SPS2003 supplies the mechanism to copy lists easily, and with
some options that I recommend to experiment with.



There are three ways to actually copy lists between sites. The least
probable one is to get into the SQL database and create the necessary tables
and then importing the data. This is unlikely to be a solution for any
administrator as it requires changing many tables and knowing the database
complex schema.

An easier and more user friendly way to do it would be to export the list to
Excel (just use the export link in the list page) and then create a new list
using the Import from Excel wizard (available on the "create" page of any
WSS site).

This method lacks in several points:
1. Export doesn't create an XLS file, but rather a .QRY file. The user has
to open the file, and copy the data to another sheet and then save it as an
XLS file.
2. The import loses field definitions - all fields are turned to regular
text fields. If you had a date field, or a lookup field - you lost it!


So the first two methods are not so good. What do we do? Luckily, the last
method gave us a perfect solution.


When in the list page, go to "Modify settings and columns," and there you
have the link that says simply: "Save list as template."


This link starts a wizard that allows you to save the list to a file. You
will have an option to save only list settings (field definitions) or to
also add the list contents (which is what I was looking for).


All you have to do is give the list a name and a description, then select
whether or not to include data. The next page will allow you to navigate to
the site template gallery. Click that link and you will see all custom
templates you saved in the past, and the new template of the list we want to
copy. Click the template name to download the STP file that contains the
data to you computer. After the download, you may want to delete the
template from the gallery to prevent users from creating more lists based on
the data.

Now we have an STP file with the data on our computer. The next step is to
import it to the waiting site.


Open the site you want to import the list to.
Click "site settings"
Click "Go to site administration"
Click "Manage list template gallery"
Click "upload template." Browse to the STP file we saved and upload it.


Now go to the "create" page in the portal. In the list of lists you created,
you will see the name of the template we imported. Click it.
Give the new list a name.


That's it! You have now imported the list, with the data (if you chose to
export the data) or without it, all field definitions are as they were, and
the only loss is the security settings of the old list!

I now suggest to delete the template from the template gallery to make sure
that users don't create more lists with the data.

By the way...did you notice that this tip also teaches you how to create a
list template? Think about it...you can create templates for list that your
users can create easily. Just don't export the data when you save the
template.

Suite


In my previous tip I showed you how to copy a list between sites, with or
without the data. But what if I already have two identical lists and want to
copy sigle or multiple items between the lists?

The solution is realy quite simple- copy and paste! Microsoft supplies us
with a worksheet view to each list. what we can do is- go to the list you
want to copy FROM and change to the worksheet view. Select the rows you want
to copy (use the leftmost cells to select rows) and press Ctrl-C to copy.


now go to the list you want to copy TO and again change to worksheet view.
now just click on the last cell in the list and press Ctrl-V to paste the
rows you copied.

Most columns are copy-paste enabled. Some (like attached files ect.) you
cannot copy using this method and you will have to use different methods
(like code) to move everything.

+++++++++++++++++++++++++++



Allez sur le site je l'ai refait et largement développé,
voir : http://www.mysps.info

@bientôt sur les news de SharePoint.
Bonne fin de semaine.

EROL
[MVP SharePoint Microsoft France]
*****************************************
http://www.sharepointpro.net
http://www.clubsps.org
http://sharepointerol.blogspot.com/
http://giraudyp.perso.cegetel.net/Livre2.htm
=============================
"Damien Minart" a écrit dans le
message de news:
Bonjour,

J'ai créé un nouveau modèle de liste à partir d'une liste que j'ai


personnalisée.
Je peux maintenant créer de nouvelles listes en utilisant ce modèle.
Néanmoins cela n'est possible que dans la zone du portail ou j'ai créé le


modèle, je ne peux pas m'en servir dans d'autres zones.
J'aimerai savoir s'il y a un moyen de rendre ce modèle accessible à d'


autres zones.
J'ai bien essayer de faire hérité le modèle de zone de la zone parent mais


j'ai alors deux zones complètement liées et identique (en plus ça ne
correspond pas exactement à ce que je veux faire même si c'eut été mieux que
rien.)



Avatar
Eric Donneger
Bonjour,

J'ai étudié votre pb. Pas simple à la base de comprendre pourquoi vous rencontrez celui-ci mais après avoir décortiqué les modèles sauvegardés, j'en arrive à l'explication suivante :

Un modèle de liste ne vaut que pour le modèle de site depuis lequel il a été créé et donc dans le cas SPS que pour le modèle de zone depuis lequel il a été créé. Autrement dit, si vous sauvegardez un modèle de liste depuis une zone reposant sur le modèle "Rubrique", vous n'en disposerez que pour celui-ci et pas pour le modèle "Sommaire" par exemple.

--
Eric Donneger
www.clubsps.org


"Damien Minart" a écrit :

Bonjour,

J’ai créé un nouveau modèle de liste à partir d’une liste que j’ai personnalisée.
Je peux maintenant créer de nouvelles listes en utilisant ce modèle.
Néanmoins cela n’est possible que dans la zone du portail ou j’ai créé le modèle, je ne peux pas m’en servir dans d’autres zones.
J’aimerai savoir s’il y a un moyen de rendre ce modèle accessible à d’autres zones.
J’ai bien essayer de faire hérité le modèle de zone de la zone parent mais j’ai alors deux zones complètement liées et identique (en plus ça ne correspond pas exactement à ce que je veux faire même si c’eut été mieux que rien…)



Avatar
EROL [MVP SPS]
Bonjour Eric,

Conclusion exacte, limitation de SPS 2003.
Voir sur le site collusion:
Q: 02 Details on Templates

http://wss.collutions.com/pages/VI%20-%20Tutorials.aspx


@bientôt sur les news de SharePoint.
Bonne fin de semaine.

EROL
[MVP SharePoint Microsoft France]
*****************************************
http://www.sharepointpro.net
http://www.clubsps.org
=============================


"Eric Donneger" a écrit dans le
message de news:
Bonjour,

J'ai étudié votre pb. Pas simple à la base de comprendre pourquoi vous


rencontrez celui-ci mais après avoir décortiqué les modèles sauvegardés,
j'en arrive à l'explication suivante :

Un modèle de liste ne vaut que pour le modèle de site depuis lequel il a


été créé et donc dans le cas SPS que pour le modèle de zone depuis lequel il
a été créé. Autrement dit, si vous sauvegardez un modèle de liste depuis une
zone reposant sur le modèle "Rubrique", vous n'en disposerez que pour
celui-ci et pas pour le modèle "Sommaire" par exemple.

--
Eric Donneger
www.clubsps.org


"Damien Minart" a écrit :

> Bonjour,
>
> J'ai créé un nouveau modèle de liste à partir d'une liste que j'ai


personnalisée.
> Je peux maintenant créer de nouvelles listes en utilisant ce modèle.
> Néanmoins cela n'est possible que dans la zone du portail ou j'ai créé


le modèle, je ne peux pas m'en servir dans d'autres zones.
> J'aimerai savoir s'il y a un moyen de rendre ce modèle accessible à d'


autres zones.
> J'ai bien essayer de faire hérité le modèle de zone de la zone parent


mais j'ai alors deux zones complètement liées et identique (en plus ça ne
correspond pas exactement à ce que je veux faire même si c'eut été mieux que
rien.)
>


Avatar
EROL [MVP SPS]
Bonjour,

Un petit complement :
http://www.msd2d.com/content/Tip_viewitem_03.aspx?IDœ6ebd7f-cb97-4d1c-a355-d2b01a803a77

Description:

Sharepoint Portal Server (SPS) 2003 includes a pre-defined Sites area which
lists all the Windows Sharepoint Services (WSS) sites associated with the
portal. Users can click on the Sites area to see the site listing and
administrators can add a site listing web part to other SPS areas.
Unfortunately, this list is not available within the WSS sites themselves.
Many portal administrators would like to have a site list displayed in the
left navigation area (which is not accessible via the browser editor) on
both the SPS home page and on each WSS home page. While this task is a
relatively simple one for an ASP programmer, most portal administrators do
not have sufficient programming skills to get the job done. Fortunately,
the task is not as difficult as it first appears and the required
functionality can be achieved without any programming knowledge.

Creating the site list is comprised of several tasks: 1) Modifying the basic
layout of the left navigation area, 2) Using a custom query to retrieve
information from the database, and 3) Creating a data view web part. The
steps to achieve each task are described below.

Modifying the Navigation Layout

1) Open the page where you wish to insert the new web part in Frontpage
2003 (earlier versions of Frontpage are not fully compatible with SPS 2003).
From the File menu, select Edit with Microsoft Office Frontpage.

Note: If Frontpage is not set as your default HTML editor in Internet
Explorer, you can change this setting by opening the Programs tab under
Tools > Internet Options and selecting 'Microsoft Office Frontpage' in the
HTML Editor drop-down list.

1) Switch to Code View by clicking on the Code button on the bottom
navigation menu in Frontpage.

2) Locate the following block of code (depending upon your site
configuration, it should exist somewhere in the first 50 or so lines)

<td id="onetidWatermark" class="ms-navwatermark" dir="ltr"> <!--[if gte vml
1]><v:shapetype id="_x0000_t136" coordsize="21600,21600" o:spt="136"
adj="10800" path=",,,,21600e">

3) Insert the following text immediately before the first <td> tag in
the above code:

<!--

4) Scroll down about 30 lines and locate the following text:

<![endif]-->

5) Delete the --> characters.

6) On the same or possibly next line, find the following text:

<td width="126" style="padding-right: 2px;">

7) Insert a closing comment tag --> before the <td in the above line and
change the width="126" value to "100%".

This procedure will remove the vertical Sharepoint Portal Server text from
the navigation bar and expand the column to the full width of the table
cell. Most importantly, by placing your comment tags in the right location
your site list will inherit the style sheet of the page, including the
correct fonts and colors to match the rest of the standard text.

Alternatively, you may remove the vertical text in the visual editor by
simply selecting and deleting it; however, because of the way the underlying
code is written, this method will cause your new site list to inherit a
different style, resulting in text that does not match the remainder of the
page. To correct this, you will need to select a new style from the
formatting toolbar in Frontpage after creating the new data view web part
(the correct style is 'ms-navframe').

Creating a Custom Database Query

Creation of the site list requires the site ID, Title, and URL to be
retrieved from the database. In Sharepoint, this information is contained
in two tables: Sites and Webs. In order to extract the correct data, the
tables must first be combined on a unique field, such as Site ID, then the
data stored in a temporary table, view, procedure or directly in memory.

1) If you have administrative access to the Sharepoint database, you can
create a stored procedure to retrieve the information needed to create the
site list; if not, ask your database administrator to create the procedure
for you. For performance and security reasons, stored procedures are the
preferred way of performing custom queries against multiple tables. To
create a new stored procedure which combines information in the Sites and
Webs tables to produce a list of WSS sites, perform the following steps in
SQL 2000 Enterprise Manager:

a) Expand the <site_name>_SITE database.

b) Right-click on the Stored Procedures node and select New Stored
Procedure.

c) Erase the default text and insert the following code into the
editor, replacing <procedure_name> with the name you assigned to the new
stored procedure:

CREATE PROCEDURE dbo.<procedure_name>

AS

SELECT

Sites.FullUrl,

Sites.Id,

Webs.Title

FROM Sites

JOIN Webs on Sites.ID = Webs.SiteId

WHERE Webs.ParentWebID IS NULL AND Webs.WebTemplate='1' AND
Webs.CachedNavDirty != '131071'

ORDER BY Webs.Title

GO

Note: The WHERE parameters in the SQL statement are used to filter out other
types of sites, such as personal and deleted sites, which should not appear
in a list of active WSS sites. The first parameter, Webs.ParentWebID IS
NULL, ensures that only top-level sites are displayed; to show all the
subsites below the WSS site level, omit this parameter. The second,
Webs.WebTemplate='1', filters out personal sites (created using the My Site
option in SPS), which also have a NULL ParentWebID. The final parameter,
Webs.CachedNavDirty != '131071', prevents deleted sites, which are removed
from SPS but not from the database, from being displayed. Depending upon
your Sharepoint configuration, you may need to modify these parameters to
return the appropriate results.

2) Configure the Sharepoint database to allow update queries, which will
give you access to the new stored procedure from a data view web part.
Click on Site Settings, then, under General Settings, click on Go to
Sharepoint Portal Server central administration. Click the Windows
Sharepoint Services link in the left navigation bar. Scroll down to the
bottom of the page and click on Configure data retrieval service settings.
On the Data Retrieval Service Settings page, check the box labeled 'Enable
update query support'. Choose OK and return to the main portal.

Creating a Data View Web Part

2) From the View menu in Frontpage 2003, select Task Pane (Ctrl+F1).

3) Open the Task pane menu by clicking on the down arrow and select Data
Source Catalog.

4) Expand Database Connections and click Add to Catalog.

5) Enter your database connection parameters, including database server
name (or IP address) and authentication credentials. You may need to get
this information from your database administrator. Depending upon the
security requirements within your organization, it may also be necessary for
the database administrator to create an account that has Owner permissions
to the Sharepoint databases instead of using your Windows credentials or the
default 'sa' account.

6) Under Select Database and Table, View or Stored Procedure, select the
<site_name>_SITE database.

7) Scroll through the list and select the new stored procedure you (or
the database administrator) created.

8) Click Finish. The table will now be displayed under Database
Connections.

9) In Frontpage design view, position your cursor in the left navigation
bar where you wish the new site list to appear. Create a new Web Part Zone
by selecting Data > Insert Web Part Zone from the menu.

10) Select Insert Data View from the drop-down menu for the
<connection_name> database connection.

11) Format the data view web part as needed. To create the list structure
and display each item as a link, perform the following steps (if you chose
to remove the vertical text by deleting it in the visual editor, first
select the new web part and choose ms-navframe from the Style drop-down in
the Formatting toolbar):

a) Remove all columns and rows except the Title data cell.

b) Select Style from the web part options menu and choose a format, such
as Plain list of titles... from the available formatting options.

c) Select a cell. From the Insert menu choose Hyperlink.

d) Click the Parameters button.

e) Under Path, click Insert Field Value.

f) Select XSL:FullUrl from the list (the exact text may vary depending
upon your configuration - the correct field will have FullUrl somewhere
within the string).

g) Click OK twice to close the Insert Hyperlink dialogs. The Title text
should now change to a hyperlink.

12) Save the page to the Sharepoint server by selecting File > Save from the
Frontpage menu.

13) View the new page within your web browser. Modify the web part as
necessary to change the title, adjust the height, set frame parameters, etc.



+++++++++++++++++++++++++++++

Allez sur le site : http://www.mysps.info

@bientôt sur les news de SharePoint.
Bonne fin de semaine.

EROL
[MVP SharePoint Microsoft France]
*****************************************
http://www.sharepointpro.net
http://www.clubsps.org
=============================
"Damien Minart" a écrit dans le
message de news:
Bonjour,

J'ai créé un nouveau modèle de liste à partir d'une liste que j'ai


personnalisée.
Je peux maintenant créer de nouvelles listes en utilisant ce modèle.
Néanmoins cela n'est possible que dans la zone du portail ou j'ai créé le


modèle, je ne peux pas m'en servir dans d'autres zones.
J'aimerai savoir s'il y a un moyen de rendre ce modèle accessible à d'


autres zones.
J'ai bien essayer de faire hérité le modèle de zone de la zone parent mais


j'ai alors deux zones complètement liées et identique (en plus ça ne
correspond pas exactement à ce que je veux faire même si c'eut été mieux que
rien.)