A Sites Column - a column from a Sites List page.
Methods
Method | Return type | Brief description |
---|---|---|
deleteColumn() | void | Deletes this column. |
getName() | String | Gets the name of this column. |
getParent() | Page | Returns the List Page this column belongs to. |
setName(name) | Column | Sets the name of this column. |
Detailed documentation
deleteColumn()
Deletes this column.
var page = SitesApp.getSite('example.com', 'mysite').getChildByName('mylistpage'); var columns = page.getColumns(); columns[0].deleteColumn();
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://sites.google.com/feeds
getName()
Gets the name of this column.
var page = SitesApp.getSite('example.com', 'mysite').getChildByName('mylistpage'); var columns = page.getColumns(); var name = columns[0].getName();
Return
String
— the column name
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://sites.google.com/feeds
getParent()
Returns the List Page this column belongs to.
var page = SitesApp.getSite('example.com', 'mysite').getChildByName('mylistpage'); var columns = page.getColumns(); // This returns a reference to page var parentPage = columns[0].getParent();
Return
Page
— the page this column belongs to
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://sites.google.com/feeds
setName(name)
Sets the name of this column.
var page = SitesApp.getSite('example.com', 'mysite').getChildByName('mylistpage'); var columns = page.getColumns(); columns[0].setName("New Name");
Parameters
Name | Type | Description |
---|---|---|
name | String | the new name |
Return
Column
— this Column for chaining
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://sites.google.com/feeds