Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • René 327 posts 852 karma points
    Jun 22, 2015 @ 13:17

    Static Title End

    Hi Thanks for sharing.. this is great.

    I have one question

    In the example for the cshtml file you have this: 2. Create a new partial view _uSeoPro.cshtml and copy the code below. In the code you have this for the title:

    <title>@title | Static Title End</title> 

    Is there an error with the : Static Title End.

    I cant get the default, which i have set on the datatype.


  • Luke 110 posts 256 karma points
    Jun 30, 2015 @ 08:49

    Hi Rene,

    Sorry for the late reply - only just seen the post.

    I could not find a way to get this info from the data type settings - so currently you have to hand write the static title in to the .cshtml file.

    Sorry for any inconvenience - if I find a solution you will be first to know :-)

    Regards, L

  • Dan White 206 posts 510 karma points c-trib
    Jul 22, 2015 @ 16:35
    Dan White


    I'm currently trying to do the same. The only options I can think of right now...

    1. Store the static title in the page model. Of course the downside to this would be that if the static title changes all nodes that use the datatype would have to be republished.

    2. Retrieve the prevalue from the datatype in the view. To my knowledge there is not a way to do this without knowing the datatype id or guid. Ex. I believe this hits the database, so you'd want to find some way of caching it.

    For my current case, I'll probably just modify the plugin and go with option 1.

  • Luke 110 posts 256 karma points
    Jul 28, 2015 @ 06:57

    Hi Dan,

    Yes I have deliberated with both ideas and for the reasons you have given I have not implemented. Updating multiple nodes would be a nightmare and hitting the db is not a great solution.

    The way I have started to use it is to have a StaticSiteTitle property on my home node.

    I then reference it @CurrentPage._StaticSiteTitle

    Thank you for your help :-)

    Regards, L

Please Sign in or register to post replies

Write your reply to: