Copied to clipboard

Flag this post as spam?

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


  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 14:01
    Fuji Kusaka
    0

    Media Picker

    Hi all,

    Is there a way of creating a property field in document type where user can make a content picker but only to the media section?

    I know this can be done with uComponents, but can this be done by creating a dataType?

    //fuji

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 18, 2011 @ 14:10
    Sebastiaan Janssen
    0

    Have you considered the default Media Picker datatype? :-)

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 14:16
    Fuji Kusaka
    0

    Hi Sebastiaan,

     

    Sorry I didnt meant media section, sorry my mistake, I actually would like to know if its possible to access a specific node in my content by creating a property field in my document type?

     

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 18, 2011 @ 14:21
    Sebastiaan Janssen
    0

    So you want to start at a specific content node, right? That can be done, but if you don't want to use existing packages, you'll be creating your own datatype which you could base on the default content picker with a configuration setting. I just don't know why you wouldn't want to use an existing package.

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 14:24
    Fuji Kusaka
    0

    :) Just to know if there are other possibilities!!! And for another good reason......am using VIRTUAL DIRECTORY!!!! :)

     

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 18, 2011 @ 14:26
    Sebastiaan Janssen
    0

    Then stop using virtual directories.. ;-)

    It's so easy to not use them, I don't understand why people keep using them. Even in XP, you can just use the webmatrix webserver instead.. so much easier. :)

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 14:28
    Fuji Kusaka
    0

    Believe me Sebastiaan, I would love to!!!! :) so much easier not using Virtual Directories and save time....

     

     

     

     

     

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 14:32
    Fuji Kusaka
    0

    Anyways i tried to create a new dataType content picker but am only getting the node id. Instead i want to get the full url?

     

     

     

     

     

     

     

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 18, 2011 @ 14:40
    Sebastiaan Janssen
    0

    You can do it, you have the power to make your life better! :-)

    In your Save() event, instead of saving the id, save this: umbraco.library.NiceUrl(theId)

    Make sure to change the datatype's type from int to nvarchar though.

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 14:54
    Fuji Kusaka
    0

    So i need to make use of marco then?

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 18, 2011 @ 14:57
    Sebastiaan Janssen
    0

    Well you could do. But.. You said you made a new datatype for this right? This datatype has a Save() function and currently what it saves is an ID, if that id is currently called "theId", you can just wrap the umbraco.library.NiceUrl around that in the Save() function so that not the ID gets saved, but the URL.

    This can become a big problem though, when you change the name of the page, that link will break (that's why it is now saved as an ID).

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 15:04
    Fuji Kusaka
    0

    Yes I created a new Datatype for this but am not sure of how to wrap the umbraco.library.NiceUrl around that in the Save() function.

     

     

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 18, 2011 @ 15:05
    Sebastiaan Janssen
    0

    Okay, could you please post your Save() function as it is right now?

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 15:10
    Fuji Kusaka
    0

    Sebastiaan i think am totally off the track right now.....am basically creating a datatype under the developer section and choosing the Content Picker  and Nvarchar.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 18, 2011 @ 15:17
    Sebastiaan Janssen
    0

    Aah, we're talking about different things, I thought you had actually made a new datatype from scractch! So in that case, you have to use a macro to convert the ID into a URL. In XSLT: <xsl:value-of select="umbraco.library:NiceUrl($currentPage/yourPickerPropertyAlias)" /> or in Razor: @(umbraco.library.NiceUrl(Model.yourPickerPropertyAlias))

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 15:31
    Fuji Kusaka
    0

    Got it working but i need to check the Skip testing (ignore errors) .

     

     

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 18, 2011 @ 15:34
    Sebastiaan Janssen
    0

    Hmm, weird, if you take out that line with the NiceUrl, do you still need to skip testing? It's probably an error somewhere else in your XSLT.

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 15:44
    Fuji Kusaka
    0

    Nope still getting the error...

     

     

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 15:59
    Fuji Kusaka
    0

    Btw Sebastiann do you know where i can download the SimplerMailer 2 package cant find it here

     

     

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 18, 2011 @ 16:07
    Sebastiaan Janssen
    0

    Okay, unrelated issue then. You can figure out where the problem is by deleting parts of your xslt file and seeing when the save succeeds. 

    Not a clue about SimpleMailer, or if it would even still work in 4.7.

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 16:09
    Fuji Kusaka
    0

    Thanks Sebastiann,

    Ive already mark it....any other similar package to the SimpleMailer?

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 18, 2011 @ 16:12
    Sebastiaan Janssen
    0

    I don't know, never used a mailer package as it's easier to write my own stuff usually. What are you trying to do? Contact form? My new Razor contact package for that is really nice and quite easy to understand and extend. :)

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 18, 2011 @ 16:14
    Sebastiaan Janssen
    0

    Oh never mind, I see it's for a mailing list. Start a new topic for that one, maybe someone can help you out.

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 16:15
    Fuji Kusaka
    0

    What we need to do is a mass mailing just like you would do as for a newsletter. We tried mail engine but we are getting so may bugs and we are going live this week.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 18, 2011 @ 16:17
    Sebastiaan Janssen
    0

    Yeah, I saw it too late, see above, you should start a new topic for it... 

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 21:55
    Fuji Kusaka
    0

    Sebastiann i just bumped into a page while testing and happen to see an error from the xslt. So if i dont pick a content node and no link is being displayed am getting a Error parsing XSLT file: \xslt\urlPicker[xslt].xslt.


    This is how am doing it

    <xsl:param name="currentPage" select="$currentPage/* [@isDoc]"/>
      
      <!-- Input the related links property alias here -->
     
      
      <xsl:template match="/">

        <!-- The fun starts here -->
       
          <xsl:element name="a">
               <xsl:attribute name="href">
                  <xsl:value-of select="umbraco.library:NiceUrl($currentPage/urlContent)" />
              </xsl:attribute>Link Is Working
          </xsl:element>
  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 18, 2011 @ 22:33
    Fuji Kusaka
    0

    sorted out....

Please Sign in or register to post replies

Write your reply to:

Draft