Re: [Hypercontent-users] [Fwd: Needed help using Hypercontent]
Brought to you by:
alexvigdor
From: Alex V. <av...@co...> - 2005-10-20 19:32:52
|
Hi Michael, If you're looking specifically at the home page, you'll notice = in the =20 project definition that the home navigation file data is included: <include data=3D"yes" metadata=3D"no" = source=3D"/config/home-navigation.xml"/> This means that you can refer to its root element in xsl like so: <xsl:variable name=3D"home-navigation" =20 select=3D"/cms:wrapper/cms:include[@path=3D'/config/home-navigation.xml']/= =20 navigation"/> However, there may be a way to leverage the XSL that's there if you =20 want to change the class name for left nav links at a certain depth. =20= As you may notice, "class" is a parameter to the "nav-item-link" =20 template, so it makes sense to determine an alternate class name, if =20 appropriate, in the XSL that calls this template. You'll find this template is activated in the "nav-item-rows" template =20= at line 215: <xsl:call-template name=3D"nav-item-link"/> If you want to change the classname for sub-menu links, you could check =20= the value of the "indent" variable that is already used to indicate =20 depth <xsl:choose> <xsl:when test=3D"$indent =3D 10"> <xsl:call-template name=3D"nav-item-link"> <xsl:with-param name=3D"class" = select=3D"'leftNavSub'"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name=3D"nav-item-link"/> </xsl:otherwise> </xsl:choose> -Alex On Oct 20, 2005, at 12:21 PM, michael ayodele wrote: > Thanks for your help. I have another question. Okay I understand what =20= > you just said about changing the css. I guess your right=A0the hard = part =20 > is the XSL.=A0 I have added a new class style to the css. And I think = I =20 > have located the=A0section in common.xsl that I need to change: > > < > xsl:template name=3D"nav-item-link"> > > <xsl:param name=3D"class"> > > <xsl:choose> > > <xsl:when test=3D"@location=3D$sourcePath">leftnavOn </xsl:when> > > <xsl:otherwise>leftnavMenu</xsl:otherwise > > > </xsl:choose> > (lines 148-153) > I figure I need to add and if statement=A0for leftnavOn and = leftnavMenu =20 > that checks if the link is a=A0Menu link or submenu link. I was = thinking =20 > I could reference the home-navigation file but I don't know how. Any =20= > suggestions. > =A0 > Michael Ayodele=A0 > =A0 > On 10/19/05, Alex Vigdor <av...@co...> wrote: Michael, >> =A0=A0=A0=A0=A0=A0 XSL is definitely the "hard part" of working with =20= >> HyperContent.=A0=A0Be >> patient, I know it took me a while to really be comfortable with it. >> The example you give is actually controlled in css; the topmost left >> nav link has a class "navhead" and the menu links have a class >> "leftnav" or "leftnavOn" for the current page link.=A0=A0Most folks = use =20 >> the >> XSL to generate just basically formatted HTML and use CSS to control >> things like font sizes, colors, background images, even positioning =20= >> for >> sites that don't worry so much about Netscape 4.7 compatibility. >> >> You may find it useful to step back from HyperContent and do some = XSL >> tutorials on-line if it's unfamiliar to you, as that way you're not >> trying to learn everything all at once. >> >> Good luck, >> =A0=A0=A0=A0=A0=A0 Alex >> >> On Oct 19, 2005, at 10:47 AM, michael ayodele wrote: >> >> > Thank You for your response. I am still a little confused about the >> > hypercontent system.How would Ias a developer use hypercontent to >> > create new html pages.For example how would I change the size of = the >> > hyperlinks in theleftnav menu bar, so that the Menu link's size and >> > color is different from its submenu links. It seems almost =20 >> impossible >> > as look through the common.xsl for thesample project. Is there an >> > easy way to do this, I am new to XML/XSL.It would really help me if = =20 >> I >> > could talk to someone on the phone. If you can could you give me a >> > call at850-766-6908 >> > >> > Michael Ayodele >> > >> > >> > On 10/18/05, Alex Vigdor <av...@co...> wrote: Hi Michael, >> >> I'll respond to your question via e-mail, since that is the >> >> preferred >> >> mechanism amongst hypercontent users, although I noticed your post = =20 >> on >> >> the forums as well. >> >> >> >> The directions in the Read Me tell you how to port an existing =20 >> project >> >> into HC2; since you're starting from scratch, the main thing you =20= >> need >> >> to do is create the repository definition under /projects/.Once >> >> you're able to access your repository via its mount point, you = have >> >> your blank slate. A directory called "/config/" is automatically >> >> created with blank project definition, groups and permissions =20 >> files, >> >> as >> >> well as copies of the workflow scripts found in the bootstrap =20 >> project. >> >> A directory called "/workflow-data/" is also created, which you = can >> >> ignore; this is where HC2 stores various workflow related data =20 >> such as >> >> batch tasks, work queues, etc.You don't need to upload a = repository >> >> zip since you're not converting an existing project. >> >> >> >> The place you start defining your file structure, XSL =20 >> transformations >> >> and such is in the file "/config/project- definition.xml ", which =20= >> when >> >> you begin is simply an empty document.This document is >> >> backwards-compatible with the format documented in the v1.4 manual >> >> starting at >> >> >> >> >> >> http://hypercontent.sourceforge.net/docs/manual/develop/project- >> >> def.html >> >> >> >> There are new things you can do in this file that are not =20 >> expressed in >> >> the 1.4 documentation, such as specify files with "**" patterns ( =20= >> e.g. >> >> /**/index.xml indicates an index page in any directory at any =20 >> level) >> >> and add output elements to resource-directories ( e.g. to =20 >> auto-create >> >> an >> >> HTML page to display an image with metadata and navigation, or to >> >>=A0=A0output multiple resized versions of an image). But for the = most =20 >> part >> >> you'll find the v1.4 documentation a good starting point for >> >> understanding what this file does. >> >> >> >> I've been promising a release candidate for a while now, which = will >> >> include a couple more sample projects which are simpler and and =20= >> show >> >> off some of the newer features.This release is planned for the = very >> >> near future, I've just been very busy with our internal migration =20= >> to >> >>=A0=A0HC2 the last few weeks, handling bug fixes and GUI tweaks = based on >> >> user >> >> feedback, all of which will make the final product more =20 >> polished.Our >> >> HC2 server handled about 40,000 requests during business hours >> >> yesterday, and our users, who had been using the 1.x series for up = =20 >> to >> >> 2 >> >> years, are very happy with intuitiveness and performance of the = new >> >> system.Of course we're only about 15% migrated, so the work goes = on >> >> . >> >> . . >> >> >> >> Cheers, >> >> Alex >> >> >> >> >> >> On Oct 18, 2005, at 12:01 PM, Carl Barrow wrote: >> >> >> >> > Hi Michael >> >> > >> >> > By way of this email I have forwarded your email to the =20 >> HyperContent >> >> > mailing list, which you should join as it is very useful >> >> > http://sourceforge.net/mail/?group_id=3D101745. There is usually = =20 >> one >> >> of >> >> > us around to help answer your questions and there is some very =20= >> good >> >> > info on there already. >> >> > >> >> > Unfortunately I am about to leave work for the evening,Alex = might >> >> be >> >> > able to send a response later today. If not I will get back to =20= >> you >> >> > tomorrow. >> >> > >> >> > Many Thanks >> >> > Carl >> >> > >> >> > >> >> > >> >> > -------- Original Message -------- >> >> > Subject:Needed help using Hypercontent >> >> > Date: Mon, 17 Oct 2005 12:10:13 -0400 >> >> > From: michael ayodele < mic...@gm...> >> >> > To: por...@hu... >> >> > >> >> > >> >> > >> >> > Hi I have been trying to use hypercontent and as you say it can =20= >> be a >> >> > very daunting task. I have been trying to follow the sample =20 >> website >> >> > that comes with hypercontent to see how the system works. =20 >> However it >> >> > is quite overwhelming. So I am trying to build a simple website =20= >> of >> >> my >> >> > own following the directions in the readme file. I am stuck now =20= >> on >> >> the >> >> > step that says to create a project-definition.xml file and >> >> uploading a >> >> > repository zip. What does my repository zip contain?, what is = its >> >> > structure? I sort of understand we are suppose to create our >> >> websites >> >> > by changing XML content, using XSL into HTML. But how does it = all >> >> fit >> >> > together, what am I supposed to provide and what does =20 >> hypercontent >> >> > take care of for me. If you help me get started I would really >> >> > apreciate, there does not seem to be a lot of documentation >> >> available >> >> > Michael Ayodele >> >> > Software Engineering Graduate Student >> >> > Florida A&M University >> >> > >> >> > -- >> >> > ************************************ >> >> > >> >> > Carl Barrow >> >> > Systems Integrator >> >> > e-Services >> >> > The University of Hull >> >> > Cottingham Road >> >> > Hull >> >> > HU6 7RX >> >> > Ext. 6838 >> >> > ************************************ >> >> > >> >> > >> >> > >> >> > ------------------------------------------------------- >> >> > This SF.Net email is sponsored by: >> >> > Power Architecture Resource Center: Free content, downloads, >> >> > discussions, >> >> > and more. http://solutions.newsforge.com/ibmarch.tmpl >> >> > _______________________________________________ >> >> > Hypercontent-users mailing list >> >> > Hyp...@li... >> >> > https://lists.sourceforge.net/lists/listinfo/hypercontent-users >> >> > >> >> >> |