Override the content rendering


Override the content rendering

Since 3.1 version, the structured content views are defined in stylesheets located in plugin/[pluginName]/stylesheets/content/[contenttype]/[contenttype]-[view].xsl

  • In a web application you can override the stylesheets to put your own stylesheets in skin/[skinName]/stylesheets/content/[contenttype]/[contenttype]-[view].xsl
  • In a CMS application you can override the stylesheets to put your own stylesheets in WEB-INF/stylesheets/content/[contenttype]/[contenttype]-[view].xsl

Where [contenttype], is the content type 'short name'.
Can be 'article', 'news', 'multimediaGallery', 'photosGallery' depending on your plugins.

Override the content wrapping

Since 3.1 version, the content view can be wrapped by the stylesheet located in workspace:web://stylesheets/content/_wrapper/content.xsl

  • In a web application you can override the wrapping of the all contents by putting your own stylesheets in skin/[skinName]/stylesheets/content/_wrapped/content.xsl
  • In a web application you can override the wrapping of the a specific content type by putting your own stylesheets in skin/[skinName]/stylesheets/content/_wrapped/content-[contentType].xsl
    For example, to override the wrapping of the a content 'news' : skin/[skinName]/stylesheets/content/_wrapped/content-org.ametys.plugins.news.Content.xsl
  • In a CMS application you can override the wrapping of the all contents by putting your own stylesheets in WEB-INF/stylesheets/content/_wrapped/content.xsl
  • In a CMS application you can override the wrapping of the a specific content type by putting your own stylesheets in WEB-INF/stylesheets/content/_wrapped/content-[contentType].xsl
    For example, to override the wrapping of the a content 'program': WEB-INF/stylesheets/content/_wrapped/content-org.ametys.plugins.odf.Content.course.xsl
Back to top