Copied to clipboard

Flag this post as spam?

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


  • Steph 11 posts 73 karma points
    Jan 23, 2015 @ 16:26
    Steph
    0

    New to Umbraco - Question in regards to document types/properties

    Hello,

    I'm very new to umbraco and I'm trying to figure out the best way to go about this or if it's even possible.

    I created a document type and added a textbox field property called "alertMessage". I want to embed this in the header of my website. <umbraco:Item field="alertMessage" runat="server" />. However, i'm noticing it's pulling from the current node (page)... is there a way to set this to just pull from a certain page (home) and use that content on every single page of the site?  Currently it'll just show up on whatever page has content added in that field, but i dont want my user to have to edit it many different places.

    This may be a stupid question, but i'm like 4 days into umbraco so I'm a total newbie and had not heard of it prior.

    Any Tips would be helpful!

    Thanks

  • Chris 92 posts 238 karma points
    Jan 23, 2015 @ 16:32
    Chris
    0

    i think something like this should to the trick:

    @(home.SiteLogo)  (this is used in the fanoe starter kit to get the topbar-icon on every page).

    @(~sitename~.~alias_of_propertie~)

  • Jan Skovgaard 11264 posts 23592 karma points MVP 9x admin c-trib
    Jan 23, 2015 @ 16:36
    Jan Skovgaard
    0

    Hi Steph and welcome to our :)

    When using the Umbraco:Item approach you can actually add an attribute called "recursive", which should make sure it's being displayed on pages where this property does not exist. I suppose you have inserted the field using the user interface in the templating section in Umbraco?

    Some good guides, articles etc. for you would probably also be these http://our.umbraco.org/documentation/Using-Umbraco/Creating-Basic-Site/

    http://24days.in/umbraco/2014/how-to-set-up-an-umbraco-site/

    http://umbraco.tv/ - This is a good ressource for learning about the different Umbraco concepts and the videos are produced by Umbraco HQ. The cost is 19€ pr. month.

    Looking forward to hearing from you.

    /Jan

  • Jan Skovgaard 11264 posts 23592 karma points MVP 9x admin c-trib
    Jan 23, 2015 @ 16:39
    Jan Skovgaard
    0

    Hi again

    I just checked and you should be able to write @Umbraco.Field('alertMessage', recursive:true) in v7 - But since you posted the umbraco:item syntax I suspect you're using an older version of Umbraco? :)

    /Jan

  • Steph 11 posts 73 karma points
    Jan 23, 2015 @ 16:46
    Steph
    0

    yes, they are using Umbraco v6.1.6. (I joined a team that uses umbraco and the sites are already setup using it.... just trying to make my way through what they have done on it and add new features.)
    I did insert the field into the template section of umbraco. Is this not a feature in the older version?

    I'll suggest upgrading and those links should be super helpful. Thank you.

  • Jan Skovgaard 11264 posts 23592 karma points MVP 9x admin c-trib
    Jan 23, 2015 @ 16:58
    Jan Skovgaard
    100

    Hi Steph

    Ok, then the syntax you need to use is a bit different- Then it needs to look like this <umbraco:Item field="adresse" recursive="true" runat="server" />

    Well there is no reason to upgrade to Umbraco 7 if everything else works and the client does not have any reason for it. Umbraco 6 is nice and stable and a good platform. But if you're into Umbraco you can learn a lot from a newcommers perspective by reading it. Even though the interface of the backoffice has changed most of the concepts are still the samme apart from the UI of the interface and the use of AngularJS for property editors.

    That should make the text appear on other pages that don't have the field.

    Hope this helps.

    /Jan

  • Steph 11 posts 73 karma points
    Jan 23, 2015 @ 17:09
    Steph
    0

    Thank you very much, that worked! I had a feeling it was something simple but literally could not find the right documentation online for it.
    I appreciate your help! :)

    I have a lot of learning to do!

  • Jan Skovgaard 11264 posts 23592 karma points MVP 9x admin c-trib
    Jan 23, 2015 @ 17:11
    Jan Skovgaard
    0

    Hi Steph

    Happy to hear it worked for you - please mark the post as solved so others who may come across it in the future can go straight to the solution.

    And don't hesitate to ask further questions in here if you're stuck with something :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft