Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Change Page title Programatically in Composite C1

$
0
0
It all depends on which technologies you've used, how you made your template and what code is handling the rendering of the actual product.

Lets say that your template is a MasterPage, then you would use the code i posted. And lets say that your handling the product in a UserControl, then you would set the title just by calling
Page.Title = myProduct.Name;
You could also be using Razor all the way, then you have something like ViewBag.Title you can set and read, or you can sometimes return a head-tag from the function that handles the product, which then would set the title, but it again depends on which type of template you have whether its supported or not.
<html>
   <head>
      <title>Title of your product</title>
   </head>

   <body> body-content of the product that should be rendered on the page </body>
</html>
So there there is no one-and-only way to do it, but it depends on what underlying technologies and methods you're using.

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>