I'm not sure if this will be an issue, but if I delete the page the content picker is looking for, then recreate it. I have to re-link the macro again. Is there a way of displaying the source as the "nodeName" instead of the "nodeID"?
Thanks Jon and Chriztian, but ideally I want to display the source as the "nodeName" instead of the "nodeID".
I should have explained my scenario in full.
I have a section on my website called "Videos" that I include "video" doctypes. I have sub pages within this section displaying the child node video doctypes within them. However there are "video" doctypes in my "Projects" section and my "About Us" section. I only want to source video's from my "Projects" section so using the suggested method will include all "video" doctypes from any section.
Here's my structure:
About Us
----Our people
--------video
Videos ----News --------video --------video ----Safety --------video --------video ----Projects (This needs to display all the child nodes and only video doctypes from my "Projects" section) --------video --------video
Projects ----Company --------video
Currently I've got it working well, but like I stated in my initial post I want my Macro the source to be displayed as the "nodeName" instead of the "nodeID".
<!-- Don't change this, but add a 'contentPicker' element to --> <!-- your macro with an alias named 'source' --> <xsl:variable name="source" select="/macro/source"/>
List sub pages from a changeable source macro template issue
I've created a "List sub pages from a changeable source" macro and have placed it into my template.
I've picked the node I want to display sub pages from, however the content picker shows the page's ID not the page name.
I'm not sure if this will be an issue, but if I delete the page the content picker is looking for, then recreate it. I have to re-link the macro again. Is there a way of displaying the source as the "nodeName" instead of the "nodeID"?
You probably could use an XPath instead (ie. root/DocumentTypeName/AnotherDocumentTypeName).
As Jon says, it's possible (as always in Umbraco):
Change your "source" parameter to a textstring instead and change your XSLT to something like this:
<xsl:for-each select="$currentPage/ancestor-or-self::root//*[@nodeName = $source]/*[@isDoc and not(umbracoNaviHide = 1)]">
/Chriztian
Thanks Jon and Chriztian, but ideally I want to display the source as the "nodeName" instead of the "nodeID".
I should have explained my scenario in full.
I have a section on my website called "Videos" that I include "video" doctypes. I have sub pages within this section displaying the child node video doctypes within them. However there are "video" doctypes in my "Projects" section and my "About Us" section. I only want to source video's from my "Projects" section so using the suggested method will include all "video" doctypes from any section.
Here's my structure:
About Us
----Our people
--------video
Videos
----News
--------video
--------video
----Safety
--------video
--------video
----Projects (This needs to display all the child nodes and only video doctypes from my "Projects" section)
--------video
--------video
Projects
----Company
--------video
Currently I've got it working well, but like I stated in my initial post I want my Macro the source to be displayed as the "nodeName" instead of the "nodeID".
Here's my code:
is working on a reply...