Multiple Content Picker (without source) Options
Marc
Posted: Friday, May 11, 2007 3:44:07 PM
Rank: Enthusiast

Joined: 10/10/2006
Posts: 16
Where did it go? I found CPalm's MultiplePagePickerViaSource but not the 'old' one with the popup tree...
Gregorius
Posted: Saturday, May 12, 2007 6:05:27 PM

Rank: Addict

Joined: 7/29/2006
Posts: 513
Location: Sydney, Australia
Hey Mark,

I think you're thinking of the Content Picker, which is part of the Umbraco base install. I'm pretty sure there isn't a content-tree version of a multi-picker.. if there is, I'll help u find it cos that'd be saweeeet. :)

greg
Marc
Posted: Monday, May 14, 2007 10:03:55 AM
Rank: Enthusiast

Joined: 10/10/2006
Posts: 16
Hi Greg,

Thx for the feedback... I was revering to this one:
Bjornbakk.EditorControls.MultipleContentPicker.dll

I just picked it up from another websites bin directory... It's the same as CPalms content picker but without the extra list. This one is just one list with an add button which pops up a popup with a tree...

Regards,

Marc
Gregorius
Posted: Monday, May 14, 2007 12:41:21 PM

Rank: Addict

Joined: 7/29/2006
Posts: 513
Location: Sydney, Australia
Hey Sweet.. i've never seen that one before, but i like it!

I'd replace alot of the multi-content pickers on my site if it'd display the Node Name instead of ID in the selected list... Daniel, any chance of fixing this?

Also, it'd be nice if you could specify a starting node for the selector, although now maybe i'm getting a little greedy. lol.

daniel
Posted: Monday, May 14, 2007 1:03:44 PM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
I'll dig trough my stuff and see if I find the source for this... ;)
Marc
Posted: Monday, May 14, 2007 2:03:51 PM
Rank: Enthusiast

Joined: 10/10/2006
Posts: 16
That would be of great help Daniel! Thx!! :!:
Marc
Posted: Tuesday, May 29, 2007 2:33:30 PM
Rank: Enthusiast

Joined: 10/10/2006
Posts: 16
Uhm... Daniel? :cry:
daniel
Posted: Saturday, June 02, 2007 8:05:07 PM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
Marc wrote:

Uhm... Daniel? :cry:


sorry... :blush:

here it is.. full source; http://daniel.xeed.no/media/251/multiplecontentpicker.rar
Gregorius
Posted: Sunday, June 03, 2007 5:02:59 AM

Rank: Addict

Joined: 7/29/2006
Posts: 513
Location: Sydney, Australia
Awesome thanks Daniel

Although, I've just installed it on my blog site (under heavy development) running V3 RC1, and it works a treat... the ID's actually change to node names after the form is saved - i didnt realise this before. This makes your content picker the best one out there i reckon... another hidden gem. :)

GB
Marc
Posted: Monday, June 04, 2007 8:51:26 AM
Rank: Enthusiast

Joined: 10/10/2006
Posts: 16
Daniel Bjørnbakk wrote:

Marc wrote:

Uhm... Daniel? :cry:


sorry... :blush:

here it is.. full source; http://daniel.xeed.no/media/251/multiplecontentpicker.rar


:w00t:
P-Maister
Posted: Wednesday, November 28, 2007 4:33:11 PM
Rank: Newbie

Joined: 8/20/2007
Posts: 9
Hi there,

Daniel's content picker is awsome! Tried to find traces of a documentaion or examples, with no luck :(

I've met a problem with outputing selected nodes.. It's fine when there's only one node which is obvious, but probles are when I want add some more..

Tried Christian's picker as well which is working fine, however I need selecting nodes from the whole tree, not specified node...


Im using XSLT as following:


Code:
                <xsl:variable name="christiansPicker" select="$currentPage/data [@alias = 'christiansPicker']" />

                    <xsl:value-of select="$christiansPicker"/>        
                                
                    <xsl:if test="$christiansPicker/value !=''">
                        <xsl:for-each select="$christiansPicker/value">
                            <xsl:variable name="item" select="umbraco.library:GetXmlNodeById(.)" />
                            <xsl:value-of select="$item/@nodeName"/>
                        </xsl:for-each>
                    </xsl:if>
        
                    <hr />


                    <xsl:variable name="$danielsPicker" select="umbraco.library:Split($danielsPicker, ',')" />

                    <xsl:value-of select="$danielsPicker"/>

                    <xsl:if test="$danielsPicker/value !=''">
                        <xsl:for-each select="$danielsPicker/value">
                            <xsl:variable name="page" select="umbraco.library:GetXmlNodeById(.)" />
                            <xsl:value-of select="$danielsPicker/@nodeName"/>
                        </xsl:for-each>
                    </xsl:if>



Thanx very much for any help.
Przemek

daniel
Posted: Wednesday, November 28, 2007 6:08:53 PM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
try:

Code:
                

  <xsl:variable name="christiansPicker" select="$currentPage/data [@alias = 'christiansPicker']" />

  <xsl:value-of select="$christiansPicker"/>

  <xsl:if test="$christiansPicker/value !=''">
    <xsl:for-each select="$christiansPicker/value">
      <xsl:variable name="item" select="umbraco.library:GetXmlNodeById(.)" />
      <xsl:value-of select="$item/@nodeName"/>
    </xsl:for-each>
  </xsl:if>

  <hr />


  <xsl:variable name="$danielsPicker" select="umbraco.library:Split($danielsPicker, ',')" />

<!-- output raw xml for the split method in a textarea -->
<textarea style="height: 400px width: 400px;">
  <xsl:value-of select="$danielsPicker" />&nbsp;
</textarea>

  <xsl:value-of select="$danielsPicker"/>

  <xsl:if test="$danielsPicker/value !=''">
    <xsl:for-each select="$danielsPicker/value">
      <xsl:variable name="page" select="umbraco.library:GetXmlNodeById(.)" />
      <xsl:value-of select="$danielsPicker/@nodeName"/>
    </xsl:for-each>
  </xsl:if>




then you would be able to see the content - and what to do for-each on :thumbup:
P-Maister
Posted: Saturday, December 01, 2007 1:23:03 PM
Rank: Newbie

Joined: 8/20/2007
Posts: 9
Hi Daniel,

Thanx for prompt reponse, didn't suppose it's gonna come so quick.

I tried to work out the code, however I think it's missing few lines?

If you can check it out and grab the rest would be great!

Thanx
Przemek
P-Maister
Posted: Wednesday, December 12, 2007 3:56:57 PM
Rank: Newbie

Joined: 8/20/2007
Posts: 9
Hi there

After hours, days, months... :hmm: of trying to work it out, I had to got back here and ask for help. That problem seems to be strange for me.

Please have a look on the code below. Two diffrent Multi Content Pickers (Christian's and Daniel's), the same output, the same executive code and one of them is not working once more than one node is been added...


CHRISTIAN'S CONTENT PICKER

Which is working perfect, but I need to be able to select nodes from diffrent locations.

Code:


    <xsl:variable name="christiansPicker" select="$currentPage/data [@alias = 'newsItems']" />

Original output:  <xsl:value-of select="$danielsPickerSplit"/><br /><br /> <!-- 1101,1226 -->

    <xsl:variable name="christiansPickerSplit" select="umbraco.library:Split($christiansPicker, ',')" />

Splitted output:  <xsl:value-of select="$christiansPickerSplit"/><br /><br /> <!-- 11011226 -->

<!-- Split() is necessary to remove comma and display results in the loop - something to do with /value -->


   <xsl:for-each select="$christiansPickerSplit/value">
    
      <xsl:variable name="page" select="umbraco.library:GetXmlNodeById(.)" />

      <xsl:value-of select="$page/@id"/> -   <xsl:value-of select="$page/@nodeName"/>  <br />

   </xsl:for-each>





DANIEL'S CONTENT PICKER

That one isn't working for me.

Code:

    <xsl:variable name="danielsPicker" select="$currentPage/data [@alias = 'newsItems']" />

Original output:  <xsl:value-of select="$danielsPickerSplit"/><br /><br /> <!-- 11011226 -->

    <xsl:variable name="danielsPickerSplit" select="umbraco.library:Split($danielsPicker, ' ')" />

Splitted output:  <xsl:value-of select="$danielsPickerSplit"/><br /><br /> <!-- 11011226 -->

<!-- Output is the same, however Split() is necessary to display results in the loop - something to do with /value -->


   <xsl:for-each select="$danielsPickerSplit/value"> 

      <xsl:variable name="page" select="umbraco.library:GetXmlNodeById(.)" />
   
      <xsl:value-of select="$page/@id"/> -   <xsl:value-of select="$page/@nodeName"/>  <br />

    </xsl:for-each> 




I'm sorry if I'm stupid but really couldn't work it out..



Many Thanx
Przemek
daniel
Posted: Wednesday, December 12, 2007 9:29:18 PM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
try somthing like this to se what the content picker gives you:

Code:


<textarea style="height: 200px; width: 600px;">

    <xsl:copy-of select="$danielsPicker" />

</textarea>



copy-of yould give you the raw content of the variable. I don't remember - but i might have wrapped the result in some xml so you don't have to use the split() function - but rather just do somthing like:

Code:


<textarea style="height: 200px; width: 600px;">

  <xsl:for-each select="$danielsPicker//item">
    <xsl:value-of select="."/>
  </xsl:for-each>

</textarea>



hope this helps...
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.