Re: [Hypercontent-users] Editable areas
Brought to you by:
alexvigdor
From: Alex V. <av...@co...> - 2005-01-25 19:05:56
|
Carl, Could you send along the XSL you're applying to this XML? That will make it easier to understand what might be going wrong. Alex On Jan 25, 2005, at 6:02 AM, Carl Barrow wrote: > Thanks very much for that, all working fine. I have changed things a > little and set a title on a repeating rightcoloumn element : > > <!ELEMENT page (rightcolumn*,bodytext,leftcolumn?)> > <!ELEMENT rightcolumn (html)> > <!ELEMENT bodytext (html)> > <!ELEMENT leftcolumn (html)> > <!ATTLIST rightcolumn title CDATA #REQUIRED> > > I have tried to get the titles into each box but have been having > trouble. It ether displayed the last one in all the boxes or it > displayed all the tiles above the boxes. Any Pointers on this? > > Thanks > Carl > > Alex Vigdor wrote: > >> Hi Carl, >> The trick here is that your right boxes are stored in html >> elements, which are also used in different contexts in the document. >> XSL provides the notion of "modes" on templates to allow you to >> different things with the same elements in different contexts. I.e. >> >> <xsl:template name="rightcolumn"> >> <xsl:apply-templates >> select="/cms:wrapper/cms:source/page/rightcolumn/html" >> mode="right-box"/> >> </xsl:template> >> >> <xsl:template match="html" mode="right-box"> >> <!-- do whatever creates the visual box --> >> <div class="right-box-style"> >> <!-- this will pass through to the original, non-moded html >> template to generate the box contents --> >> <xsl:apply-templates select="."/> >> </div> >> </xsl:template> >> >> Alex >> >> On Jan 21, 2005, at 6:19 AM, Carl Barrow wrote: >> >>> Alex/Adam >>> >>> Thanks very much. I have a repeating element for the right boxs in >>> there and it allows the users to add as many as they want at the >>> moment, I haven't decided weather I'am going to restrict them, >>> although I think it might be wise. >>> >>> My DTD for the full page content is : >>> <!ELEMENT page (rightboxes,bodytext,leftcolumn?)> >>> <!ELEMENT rightboxes (html*)> >>> <!ELEMENT bodytext (html)> >>> <!ELEMENT leftcolumn (html)> >>> <!ATTLIST bodytext CDATA #REQUIRED> >>> >>> In my template I have a variable that contains the content of >>> rightbox/html : >>> <xsl:variable name="rightboxlen" >>> select="/cms:wrapper/cms:source/page/rightbox/html" /> >>> >>> I then check if that is not 0 and put the box in there : >>> <xsl:choose> >>> <xsl:when test="string-length($rightboxlen)=!0"> >>> <xsl:call-template name="rightcolumn"/> >>> </xsl:when> >>> <xsl:otherwise> >>> <xsl:text> </xsl:text> >>> </xsl:otherwise> >>> </xsl:choose> >>> >>> The rightcolum template being (taking out html): >>> <xsl:template name="rightcolumn"> >>> <xsl:apply-templates >>> select="/cms:wrapper/cms:source/page/rightcolumn/html"/> >>> <xsl:if test="$filedate"> >>> >>> All works fine....apart from the fact that it puts all the html >>> elements for rightbox is the same box on the page. I can see why >>> it's doing that but I can't figure out how to get them in separate >>> boxes. >>> >>> Can you help with that at all? >>> >>> Thanks for all you help >>> Carl >>> >>> >>> At the moment, I'm checking if the >>> >>> Alex Vigdor wrote: >>> >>>> Well, you could limit it to 3 by explicitly declaring each as a >>>> separate element: >>>> >>>> <!ELEMENT page (html,right-box1*,right-box2*,right-box3*)> >>>> >>>> It makes for a less appealing DTD, but allows you to keep users >>>> from trying to add a hundred boxes to a page . . . >>>> >>>> Alex >>>> >>>> On Jan 20, 2005, at 11:13 AM, Adam Carl wrote: >>>> >>>>> Carl, >>>>> >>>>> There is no way using the current interface to do the following: >>>>> >>>>> " So for example, for the right hand orange boxes the user might >>>>> be presented with an option to add 0-3 boxes, then on selection >>>>> have the editable text appear for each box." >>>>> >>>>> The standard interface is not that flexible. >>>>> >>>>> You could give them the option to add one or more right hand boxes >>>>> by setting up a dtd. Alex had a good example. >>>>> >>>>>>> <!ELEMENT page (html,right-box*)> >>>>>>> <!ELEMENT right-box(html)> >>>>>>> <!ATTLIST right-box title CDATA #REQUIRED> >>>>>> >>>>>> >>>>> >>>>> You could also set it up like this: >>>>> >>>>>>> <!ELEMENT page (html,right-boxes)> >>>>>>> <!ELEMENT right-boxes(html*)> >>>>>>> <!ATTLIST right-box title CDATA #REQUIRED> >>>>>> >>>>>> >>>>> >>>>> This way every html area in the right-boxes element was its own >>>>> Information html section. Ahh but the problem here would be having >>>>> a title for each. >>>>> >>>>> >>>>> Adam >>>>> >>>>> >>>>> >>>>> On Jan 20, 2005, at 4:05 AM, Carl Barrow wrote: >>>>> >>>>>> Hi Adam >>>>>> >>>>>> If you have any further pointers on this that would be great. It >>>>>> would really finish of what I've been getting setup here. >>>>>> >>>>>> Thanks >>>>>> Carl >>>>>> >>>>>> Alex Vigdor wrote: >>>>>> >>>>>>> Hi Carl, >>>>>>> We do something almost identical to what you are describing >>>>>>> on one of our latest sites >>>>>>> >>>>>>> http://www.columbia.edu/hr/index.html >>>>>>> >>>>>>> If you navigate across the top-level pages you'll notice that >>>>>>> each of them has a slightly different box arrangement. Adam >>>>>>> should be able to describe the implementation in more detail, >>>>>>> but I believe in XML you could just have a repeating element >>>>>>> "right-box" with a single child "html" and an attribute for its >>>>>>> title, and in XSL and/or CSS you could set up the actual >>>>>>> on-screen positioning. E.g. >>>>>>> >>>>>>> <!ELEMENT page (html,right-box*)> >>>>>>> <!ELEMENT right-box(html)> >>>>>>> <!ATTLIST right-box title CDATA #REQUIRED> >>>>>>> >>>>>>> and call different templates with "/page/html" vs. >>>>>>> "/page/right-box/html". >>>>>>> >>>>>>> Alex >>>>>>> >>>>>>> On Jan 19, 2005, at 9:51 AM, Carl Barrow wrote: >>>>>>> >>>>>>>> Hi Alex >>>>>>>> >>>>>>>> Thanks for the info on downloads. I'll leave things as they >>>>>>>> are and have a look at getting updated to v2 when it's >>>>>>>> released. >>>>>>>> >>>>>>>> I have a question which might not be possible. If you take a >>>>>>>> look at the sample page >>>>>>>> http://www.learndev.hull.ac.uk/CB/REOTESTPAGE.html you will >>>>>>>> notice that I have info boxes down the right hand side of the >>>>>>>> page and under the menu items on the left. At the moment I am >>>>>>>> dropping these boxes into editable areas in html form which >>>>>>>> works great for me but might not for some of the users on >>>>>>>> campus. Is there any way ether now or in future releases of >>>>>>>> HyperContent that a user could add as many boxes as the wanted >>>>>>>> but not have to worry about any html? So for example, for the >>>>>>>> right hand orange boxes the user might be presented with an >>>>>>>> option to add 0-3 boxes, then on selection have the editable >>>>>>>> text appear for each box. >>>>>>>> >>>>>>>> Just something that I thought about..... >>>>>>>> >>>>>>>> Many thanks >>>>>>>> Carl >>>>>>>> >>>>>>>> -- >>>>>>>> ************************************ >>>>>>>> >>>>>>>> Carl Barrow >>>>>>>> Web Developer >>>>>>>> e-Services >>>>>>>> The University of Hull >>>>>>>> Cottingham Road >>>>>>>> Hull >>>>>>>> HU6 7RX >>>>>>>> Ext. 6838 >>>>>>>> ************************************ >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> ------------------------------------------------------- >>>>>>>> The SF.Net email is sponsored by: Beat the post-holiday blues >>>>>>>> Get a FREE limited edition SourceForge.net t-shirt from >>>>>>>> ThinkGeek. >>>>>>>> It's fun and FREE -- well, >>>>>>>> almost....http://www.thinkgeek.com/sfshirt >>>>>>>> _______________________________________________ >>>>>>>> Hypercontent-users mailing list >>>>>>>> Hyp...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/hypercontent-users >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------- >>>>>>> The SF.Net email is sponsored by: Beat the post-holiday blues >>>>>>> Get a FREE limited edition SourceForge.net t-shirt from >>>>>>> ThinkGeek. >>>>>>> It's fun and FREE -- well, >>>>>>> almost....http://www.thinkgeek.com/sfshirt >>>>>>> _______________________________________________ >>>>>>> Hypercontent-users mailing list >>>>>>> Hyp...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/hypercontent-users >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> ************************************ >>>>>> >>>>>> Carl Barrow >>>>>> Web Developer >>>>>> e-Services >>>>>> The University of Hull >>>>>> Cottingham Road >>>>>> Hull >>>>>> HU6 7RX >>>>>> Ext. 6838 >>>>>> ************************************ >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------- >>>>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive >>>>>> Reporting >>>>>> Tool for open source databases. Create drag-&-drop reports. Save >>>>>> time >>>>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, >>>>>> etc. >>>>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>>>>> _______________________________________________ >>>>>> Hypercontent-users mailing list >>>>>> Hyp...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/hypercontent-users >>>>>> >>>>> Adam Carl >>>>> AIS Web Services >>>>> (212) 854-0131 >>>>> ac...@co... >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------- >>>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive >>>>> Reporting >>>>> Tool for open source databases. Create drag-&-drop reports. Save >>>>> time >>>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, >>>>> etc. >>>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>>>> _______________________________________________ >>>>> Hypercontent-users mailing list >>>>> Hyp...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/hypercontent-users >>>> >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive >>>> Reporting >>>> Tool for open source databases. Create drag-&-drop reports. Save >>>> time >>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, >>>> etc. >>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>>> _______________________________________________ >>>> Hypercontent-users mailing list >>>> Hyp...@li... >>>> https://lists.sourceforge.net/lists/listinfo/hypercontent-users >>> >>> >>> >>> -- >>> ************************************ >>> >>> Carl Barrow >>> Web Developer >>> e-Services >>> The University of Hull >>> Cottingham Road >>> Hull >>> HU6 7RX >>> Ext. 6838 >>> ************************************ >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive >>> Reporting >>> Tool for open source databases. Create drag-&-drop reports. Save time >>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, >>> etc. >>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>> _______________________________________________ >>> Hypercontent-users mailing list >>> Hyp...@li... >>> https://lists.sourceforge.net/lists/listinfo/hypercontent-users >> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IntelliVIEW -- Interactive >> Reporting >> Tool for open source databases. Create drag-&-drop reports. Save time >> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >> _______________________________________________ >> Hypercontent-users mailing list >> Hyp...@li... >> https://lists.sourceforge.net/lists/listinfo/hypercontent-users > > > -- > ************************************ > > Carl Barrow > Web Developer > e-Services > The University of Hull > Cottingham Road > Hull > HU6 7RX > Ext. 6838 > ************************************ > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Hypercontent-users mailing list > Hyp...@li... > https://lists.sourceforge.net/lists/listinfo/hypercontent-users > |