Goto main content

Site management

Create a page type

 

Step One

Create a new table with the table name as the code of your page type that you would like to create by copying the table sed_site_page
How to perform this step:

  • Navigate to: DEV > Datebase management > Tables list
  • Search for sed_site_page
  • check the box to the left of the row 
  • Click the button Copy

A new row called Copy of sed_site_page will appear, Click the pencil icon on the left to make changes to that specific row  :

  • Rename your table to the code of your page type that you would like to create.
  • Give it its names as well.
  • Associate a website’s module. If no module is associate, select the first it option in de module list: "Please select an option"

Select the checkboxes in the Menu section for where you would like this to show up (recommended: site_developement) and hover over Save, then click Save and Publish.
You now have the appropriate table to store your new custom site pages. Now we need to write the Publish for this page.

Step Two

Create a file which will handle the publishing of our future page. This file will correct the publishing references necessary to make your custom page publish.
How to perform this step:

  • Navigate to: SITE-DEV > Site developpement > Site publish
  • Click the Add button.

You should see the two following fields:

In reference code, type the code of your page type that you would like to create. In program, type /site/publish/  the code of your page type   .sn  
Example: Reference code: mf_news Program: /site/publish/mf_news.sn

Under your program name (the thin gray space), paste the following code on the next page:

 

{_{    
     %include "/extenso/module/sed/mod/package/sed_mod_util.sn";
     use lg;         // From publish
     use table;      // From publish
     use item;       // From publish
     use code;       // from grid update
     use config;     // from preload
     
     table_name = "your_table_name";
     module = "your_module";
     
     use cgidata;
     
     ct = {
          "lg" : lg,
          "module" : module,
          "global_only" : true,
          "ct_global" : "sed_core_ct_global",
          "edit":false
          };
     include("/extenso/module/sed/core/include/publish_page_type.sn");
}} 

 

Replace your_table_name with your table name and your_module with your associated module. 

Once all these steps done, hover over Save and click Save and return. 
You are now set to create a new page type! Your new page type should appear after an Extenso refresh in the right navigation pane in the Page Tab. 

 

Step three

 

  • go to: DEV > Module management > page type
  • Click on Add button.
  • Select the table in the list and Save and Publish

© 2024 extenso Inc. All rights reserved.