how to make a sidebar / sideblog?
This is an open discussion with 14 replies, filed under XSLT.
Search
Couldn't find end of Start Tag call-template line 50 in Entity
It looks like you have a tag mismatch. Posting your XSLT would make it a lot easier to help.
This one's utility:
<xsl:template name="get-side-blog"> <xsl:for-each select="side-blog/entry"> <h2><xsl:value-of select="fields/title" /></h2> <xsl:copy-of select="fields/side-body/*" /> </xsl:for-each> </xsl:template>
and this one's the page that calls side blog:
<xsl:template match="data"> <xsl:call-template name:"get-side-blog" /> </xsl:template>
As I said, I was simply following video tutorial.
What I see xsl:for-each
starttag is missing.
And of course you will have to call the template from your page (or master):
<xsl:call-template name="get-side-blog"/>
You have name:"get-side-blog"
instead of name="get-side-blog"
.
Thank you Allen !!!
it's amazing how much trouble one oversight can get me in, especially when i don't see it.
you coders really do have good eyes.
Now I have page displaying but not the text itself. Only title of it.
Can you maybe pastie your XSL and XML?
I don't see any mention of get-side-blog
in your XSLT. When I run the document, it produces the default template's HTML fine. Albeit without a side blog.
sorry. wrong page. it can happen to me :P
my appologies
XML
http://www.pastie.org/348237
XSLT
http://www.pastie.org/348238
diomed -
you're not including any reference to the fields/side-body
node. You only have the fields/title
node in there.
sorry for being such a noob, but where should i include it, and how?
i'd only need that few lines of code, please.
Your XML only includes a title. There is no body data there. Add that field to the data source.
diomed -
i think wtdtan was referring to your XML, you don't have "side-body" node for your Side Blog in your XML.
i took some of your lorem ipsum stuff from your previous pastie post and put it in your XML to show you an example. If your textarea for your sideblog is called "side-body", then the attached code should work. Also, you'll want to make sure that you included the "side-body" field in your datasource.
Try this XML, http://pastie.org/348453
and this XSLT, http://pastie.org/348452
Create an account or sign in to comment.
no, really, how could I do it? because, I want to do it, and I even followed video instructions on how to do it, in symphony 1.7 but I still somehow got it wrong;