Copied to clipboard

Flag this post as spam?

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


  • Peter Duncanson 430 posts 1360 karma points c-trib
    Nov 10, 2009 @ 15:10
    Peter Duncanson
    0

    Over-write base page values?

    Another one for you!

    I have created a Base Document type that all other content pages are nested under, this allows them to inherit a load of juicy bits and bobs like Page Title, Description, Keywords, etc.

    In my header I know I can pull these out from any page which inherits from my Base Document Type and I've allowed a default in case none has been set. Lovely.

    I've just installed the Blog4Umbraco but I've got two problems.

    1) I can't seem to move the Blog document type under my Base doc type. I've ticked the "allow Blog" as a child type in my Base doc type and then reloaded the node list but its not moved. Am I missing something?

    2) What if though I want to set the page title to the title of each blog post? The original blog did this by having its own master template, but I don't want to cut and paste my design into two templates so how can I get my title into my master template. I could add it as an alternative field to look for but it would be nice to be able to set up an alias in the blog template itself which copies the blog post's title into the pageTitle variable, not sure how though or even if you can do it?

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Nov 10, 2009 @ 15:57
    Chris Houston
    0

    Hi Peter,

    Question 1

    You cannot move document types once they have been created, I assume this is by design because if you did move them all of a sudden you would have content nodes that did not match their document types and as soon as someone edited one of the content items I guess they would loose the old data.

    The way you can do this is to delve into the database and look for the following table:

    cmsContentType

    Then find your new blog document type and change it's "masterContentType" to the ID of your master document type.

    Question 2

    If you make the above change you could then just modify the Blog XSLT to reference your pageTitle, I think that will solve your problem right?

    Cheers,

    Chris

     

  • Peter Duncanson 430 posts 1360 karma points c-trib
    Nov 10, 2009 @ 17:39
    Peter Duncanson
    0

    That sorted the parent doc type problem thanks Chris. Now I can play with getting the right info out. Cheers.

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Nov 10, 2009 @ 23:27
    Chris Houston
    0

    No problem, don't forget to click the little "helpful thumbs" and mark the solution :)

    Cheers,

    Chris

Please Sign in or register to post replies

Write your reply to:

Draft