Create a list with values from name field - true/false
Hi everyone,
I am trying to end up with this:
<ul>
<li>Photo gallery</li>
<li>Latest news</li>
</ul>
which would be generated through true/false selection. ie in the content area there would be ' Photo gallery ( ) and Latest news ( )'. ( ) = a check box.
I need to apply a default value (or use the field name is that's possible?) to the box which displays if the box is ticked.
string(umbracoNaviHide) != '1'
If 1, displays, if boxed is checked, does not display. Any ideas? Thanks in advance.
Do you need to make sure some boxes are displayed on certain pages or what is your need exactly? I've read your post a couple of times and I'm not quite sure what it is you're after.
I don't think you should rely on the umbracoNaviHide for anything else than to decide whether or not a page should shown in navigation or not. But it does of course depend on what it is you're trying to do ;-)
I haven't managed to get anything displayed yet. What I want to do is when I create a new portfolio page, the page has standard fields like page title, body text, image to use etc. I also want to add a bunch of check boxes which will have names like Photo gallery, latest news, upcoming events. I will check the box next to each of these features that are on the site that I am creating a page about. Once the page is published, under a heading of 'Website features' will be the list, which is made up of the items I have selected.amic list depending on what the user selects.
ie something like this;
<ul>
<xsl:if test="$currentPage/self::*[isDoc and string(photoGallery) != '1']"> <li><xsl:value-of select="photoGallery" /></li> </xsl:if>
<xsl:if test="$currentPage/self::*[isDoc and string(latestNews) != '1']"> <li><xsl:value-of select="latestNews" /></li> </xsl:if>
High five for obvious solutions! :) I did actually want to render the value of the checkbox, the 'Name' field but didn't get that far. This is my simple version of adding a 'tag'. I wanted to develop it into links to so when the box is checked it adds a link. Starting simple!
Create a list with values from name field - true/false
Hi everyone,
I am trying to end up with this:
<ul>
<li>Photo gallery</li>
<li>Latest news</li>
</ul>
which would be generated through true/false selection. ie in the content area there would be ' Photo gallery ( ) and Latest news ( )'. ( ) = a check box.
I need to apply a default value (or use the field name is that's possible?) to the box which displays if the box is ticked.
string(umbracoNaviHide) != '1'
If 1, displays, if boxed is checked, does not display. Any ideas? Thanks in advance.
Sam.
Hi Sam
Could you maybe show us the XSLT that you've got so far? And what the output of that XSLT is.
/Kim A
Hi Sam
Do you need to make sure some boxes are displayed on certain pages or what is your need exactly? I've read your post a couple of times and I'm not quite sure what it is you're after.
I don't think you should rely on the umbracoNaviHide for anything else than to decide whether or not a page should shown in navigation or not. But it does of course depend on what it is you're trying to do ;-)
/Jan
I haven't managed to get anything displayed yet. What I want to do is when I create a new portfolio page, the page has standard fields like page title, body text, image to use etc. I also want to add a bunch of check boxes which will have names like Photo gallery, latest news, upcoming events. I will check the box next to each of these features that are on the site that I am creating a page about. Once the page is published, under a heading of 'Website features' will be the list, which is made up of the items I have selected.amic list depending on what the user selects.
ie something like this;
If that helps :)
Sam.
Maybe this will help you Sam:
Then we just check to see if any of the two checkboxes are checked, and if so there will be rendered a li-element.
/Kim A
Thanks Kim,
Sadly, yes, it was just as easy as that, I've been 'working on it' for about an hour :(
However I did work it out :) and was just about to post, never realised you'd answered it!
So, if I now tick all four, this renders:
High five for obvious solutions! :) I did actually want to render the value of the checkbox, the 'Name' field but didn't get that far. This is my simple version of adding a 'tag'. I wanted to develop it into links to so when the box is checked it adds a link. Starting simple!
Sam.
is working on a reply...