AsciiDoc navigation panel - menu

How i can create a left navigation panel in AsciiDoc?
like this one here https://docs.asciidoctor.org/asciidoc/latest/
not a list of contents.
Thanks.

The navigation pane in your screenshot includes links to many HTML files. asciidoctor doesn't have any built-in facility for generating multiple HTML files from an Asciidoc markup file.
To do that for your own Asciidoc content, you need a tool that processes many Asciidoc files and generates an entire site. Such tools are called static site generators. There are many, and quite a few support Asciidoc markup, including Hugo, Jekyll, and Eleventy.
The Asciidoctor documentation was generated with a tool called Antora, which was created by the author of asciidoctor. Its goal is to specifically support generating technical documentation web sites (and eventually PDF documents) from Asciidoc markup.
Many companies with large sets of technical documentation use Antora. This page lists the companies and sites using Antora, plus public repos with the implementations (where available).

Related

How to render asciidoc filename in asciidoctor template?

I have a asciidoctor template similar to this one:
https://github.com/asciidoctor/asciidoctor-backends/blob/asciidoctor-v0.1.4/erb/html5/document.html.erb
I would like to include a link into my documents which points to the asciidoc file that was used to generate the document.
Is there a way to access the asciidoc filename within my template?
I'm using the asciidoctor-maven-plugin to render my documents.
By looking at the built-in data attributes, I think that you are looking for {docfile} (evaluation depends from how the document is processed and when and where is it processed).
For me it works with the asciidoctor-maven-plugin (I get the absolute path to the file) but not in the chrome preview.

XPages: Is there a way to copy/rename custom controls

In Lotuscript you can manipulate design elements - create them, change them, rename them, etc.
Are you able to do the same thing for Xpages and custom controls design elements?
====================================================================
My question should have been clearer. What I want to accomplish is to copy an existing cc and give it a new name, programatically. The app will then close and reopen (or refresh or get rebuilt) so that the app can "see" the new cc. If I copy the cc it will only have one field on it. I will add custom code later. I could just create a new cc with no code in it, that would work too.
I am not familiar with the DXL exporter but I can research it. Using that can I just export the design of the cc to an XML file in a temp directory, use the transform to change the name, and then import the control?
I think the XPage or Custom Control design elements are probably under MISC_CODE or MISC_FORMAT design elements in a NoteCollection.
However, accessing that design element is the easy part. Doing a create / rename / change etc is a much bigger task.
Remember that the XPage or Custom Control XML file is only a starting point:
XPages and Custom Controls also have a .xsp.metadata file, as you'll see with source control.
Custom Controls will also have (and need) a .xsp-config file.
There are corresponding .java files for every XPage and Custom Control in the Local source folder. They're created by a builder based on parsing the XML. I don't think you'll be able to create those programmatically. I'm not sure of the impact of renaming them.
For Custom Controls, even if you can rename the .java file, it's referenced in the .java files of relevant XPages. Updating those is goiong to be a significant task.
The XPages runtime doesn't even use those .java files. Instead it uses the .class files in WebContent\WEB-INF (you need to use Project Explorer view and modify the filter to see those files). This is compiled byte code, so you won't be able to update the .class files for XPages containing renamed Custom Controls, as far as I know.
Even if you can rename the .class files, the XPages runtime almost certainly won't use them until either a Clean (which will overwrite anything you've done) or an HTTP restart. As far as I can tell they're cached.
Depending on your use cases, it's possible not all these points will be an issue, e.g. if you're modifying the XML files and building with headless designer.
I suspect this is why nothing was added to the NoteCollection object or a specific NotesXPage / NotesCustomControl API class added.
In Lotuscript you can manipulate design elements - create them, change them, rename them, etc.
This is only partially true. There is a LS API to create/alter views and outlines. Good luck with other design elements - although they're standard "notes", so you can access their items, in most cases you won't compile them and there will be some problems with signatures (real experience with TeamStudio CIAO).
Your question has two points of view - do you want to alter design elements in design process or alter running application?
To help a designer you can go the way of Eclipse extensions and enrich tools in IBM Designer to help developer. Something like TeamStudio Designer. In this case you need to look for source design elements, mentioned by Paul.
To enrich application you don't need to alter source design elements. IBM Designer transforms XML in source code to a Java code (JSF framework) - so you can generate your Java code from anything you wish. Take a look inside Local\xsp folder of NSF in Package explorer. You will find Java sources made from your XPages and Custom Controls. So if you don't need to work with design elements, go for Java components - they can be built on the fly.
And of course, there is always the option of DXL framework - so you can clone/alter design of the application through XML transformations. Good starting point: http://www-10.lotus.com/ldd/ddwiki.nsf/dx/ls-design-programming.htm

SharePoint: Site Collection Images vs Images vs Style Library Images

Something I've been wondering. Is there a best practice or rule of thumb on how to store your images? I see 3 ways currently:
Site Collection Images
Images library
Style Library/Images
My rule of thumb has been: if you have only 1 site collection for your project, then use the Site Collection Images. Otherwise, create a folder structure like: /Style Library//images.
What is the difference between Site Collection images and the Images library?
Images lib provides a thumb view by default while the Style lib/images just treat images as files.
Site collection images? I think it's just another name of the Style lib/images of the top site.
Site Collection Images is a carry-over document library from the 2007 Publishing Feature. It's a document library but with multiple content types assigned to it (Image, Audio, Video). There's a thumbnail view associated with some of the content types so you get a nice preview of an image.
Images is a new library called and Asset library but in reality and behind the scenes, it's exactly the same as the old Site Collection Images document library with the three custom content types assigned to it. The only difference I can see is the icon used for the library.
Style Library is just a regular document library with no content types associated with it. It's created as part of the Publishing feature and pre-populated with some basic images, css files, and xsl style sheets (that are used with the DataView Web Part).
My standard (if you want to call it that is this).
A new folder for your site in the Style Library (sitename) with subfolders of "css", "js", and "img". The reason for this naming is that some libraries, plugins, and other addons will look for this type of structure (with CSS doing a relative path to an "img" folder to look for images). So it keeps things compact and identifable.
I choose to put CSS, JavaScript and Images here rather than creating separate libraries for it all. CSS is for (obviously) style sheets. JS is for javascript. This would include jquery (in the root js folder) or jQuery plugins (in a separate folder for each plugin). IMG is for CSS icons, system icons (e.g. twitter badges, etc.). I find this layout just handy and doesn't hurt anything keeping it all together.
I put regular photo content into Site Collection Images since a) it gets automatically populated when you create a publishing site or activate the feature and b) it's easy to find when inserting pictures into a rich content field. I'll just hide or tell the users to ignore the Images library (it can't be deleted because it's part of the Publishing Feature).
Hope that helps. YMMV.
I'd add that the style library is also different in that it's contents are readable by all users even if you have removed their permissions to the library or an item within the library.

Sharepoint - Custom ItemStyle in a new file

how can I customize the presentation of a Content Query Web Part by modyfing the xsl it uses without touching ItemStyle.xsl but using a brand new .xsl file?
I'm using MOSS 2007.
Thanks
There are lots of Articles on Customising the CQWP,
Healther Soloman's being one of my faves
here
But this
is a succint article doing exactly what you describe
using your own xsl by changing the Settings in the DWP (export/edit/import)
You could get really fancy and create your own version of the CQWP by inheriting from ContentByQueryWebPart and setting all the attributes you want in that code and including the files in you new feature to house said webpart and new files.

Custom SharePoint List View - can I put it in a feature (WSP)?

Here's my situation:
I'm working in SharePoint 2007 Enterprise, I have a feature that creates a list for me when I deploy and activate it. My usual workflow thus far has been to deploy the solution, activate it, then open up SharePoint Designer to customize the list.
My customizations are typically pretty complex, but I'll keep things simple. In this case, let's just say that I edit AllItems.aspx, convert the data view to an XSLT data view, then I add one column with static text.
I've used a few different tools (SPSource, VSeWSS, SharePoint Manager, OCDExportList, etc) to extract my custom schema.xml and all the default views, but I have yet to have any luck figuring out where the the code for AllItems.aspx is now that it's been customized.
When I extract (using any of the tools above) AllItems.aspx is no different than the default. The <View> element in schema.xml is reduced to one line, for example:
<View DefaultView="TRUE"
MobileView="TRUE"
MobileDefaultView="TRUE"
Type="HTML"
FPModified="TRUE"
DisplayName="All Documents"
Url="Forms/AllItems.aspx"
Level="1"
ContentTypeID="0x" />
I'm really stuck here... I've got no clue what to do. Is it even possible? It would save me a great amount of time (and documentation) if I could include my customizations in my feature.
If there's any other info I'm missing that would help, let me know... thanks!
Latest findings:
I've found out a bit more in the past couple hours. If I save the list as a List Template, then save the .stp file locally as a .cab file I can extract its contents. One of the files is manifest.xml which contains the schema.xml as well as a few other sections.
One of those sections is a <webparts> section that has a <webpart> for each view. Each of those <webpart> elements contains a really long string of characters... no clue what those characters actually represent.
The important thing is that I think any custom views have to actually be Web Parts if deployed as part of a solution... but I'm not positive.
I have faced a similar issue a while ago. I had to create a very customized view and I had to give up the ListFormWebPart completely, and have created my own webpart to render the data.
Generally, when you customize the aspx file in SPDesigner, all your changes will be in the aspx file itself. Open it in SPDesigner and you will see there all the changes you have made. After you have converted to the XSL Data View, the standard ListFormWebPart is replaced by a DataFormWebPart, which doesn't care about the <View> tags specified in the schema.xml; Look in the aspx file itself for the ListFormWebPart.
Why not do all the customizations you want on a list, save the list as a template (it will include the associated AllItems.aspx) and then use that template in your feature to create your list? You could add the extracolumn from code (if it's dynamic and cannot be included in the template), and so on.
Yes you can. Get the Sharepoint manager tool from Codeplex
http://spm.codeplex.com/
Install it on a machine in your farm, it will allow you to browse the farm via a tree view that shows all objects.
Make the list via the Sharepoint GUI, then browse to it w/ SPM.
SPM will allow you to extract the MOSS/WSS created xml that describes the list view (it shows up in the left hand property grid), which you can then plop into your manifest.xml
I have a similar issue and have been doing a lot of research into this. The dataview web part to me is one of the most powerful components in Sharepoint. Unfortunately I have to provide my solution as a .wsp package and that means that I can not just make the site and use Designer on that site. I have taken a 2 step approach in that I used designer to create my dataview and I also edited the code of that dataview to replace the ListID and Guids to ListName and the actual list name. This allows it to be exported and used in any page/site as long as the list name is the same. I am creating a webpart page document library also in my solution and I believe I can add the pages that have the webparts to this library using the onet.xml file. I will try to get the results of that test in as soon as I can do it.

Resources