ASPX templates
Version 4.x > ASPX templates > add custom properties in siteContext and use it in links to documents View modes: 
User avatar
Member
Member
calais-club-internet - 3/25/2009 11:19:08 AM
   
add custom properties in siteContext and use it in links to documents
In the Home page, the user can choose the "version" of the site to navigate (like full version/short version)

After that, depending his choose, when he click on a link in a document (like /news)
the cms choose which page to display between "/news/news_full and news/news_short

The idea is to have in the site different kind of documents
- documents available for both (full and short versions)
- documents only available for full version
- documents only available for short version

The first solution is to manage 2 trees : 1 for the full and 1 for the short and use linked documents for the documents which have to be used in the 2 versions
But regarding the huge number of documents i will have to manage this is not the right way.

So my idea is :
- each documents in the tree view use a document type with 2 bolean fields version (full and short)
- in the home page the user select the version he want to use; the property is saved in the siteContext or any other context object (which one is the best?)
- in the document (page) of the site, the links ask a special document (like a folder) with a redirect path with a custom macros;
- this macros choose the first document under the folder which have the currentVersion (selected by the user) set to true.

a little bit complicate, its why i would like to ask if anybody have any suggestion

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/26/2009 5:01:21 AM
   
RE:add custom properties in siteContext and use it in links to documents
Hi,

If you are not using multilingual site, you can use this approach. E.g. you will configure the site to use two cultures (with the same date format, etc.), but you won't display the flags and language selection. So, for example site in en-gb culture will be the "full" version and site in en-au culture will be the short version.


Best Regards,
Juraj Ondrus