What you could do is displaying the counter only in edit mode, or only if the user is an admin...
Philippe.
At 12.10.2004 16:02, you wrote:
Well i made a new model that i add via the administration and i pplied this to the page i made
the link is http://web-test/jahia/Jahia/pid/66
-----Message d'origine----- De : Philippe Vollenweider [mailto:[EMAIL PROTECTED] Envoy� : mardi 12 octobre 2004 15:29 � : [EMAIL PROTECTED] Objet : RE: Counter Page
Hi,
How do you access your files stats.inc/stats.jsp? Do you use the engineName sitemap? What does your stat url look like?
Philippe.
At 12.10.2004 15:21, you wrote: >Thks Mister Huber for those reply. > >For the getcounter() i found it ^_^ >and it works. > >Now i want to make a statistic page. > >the number of hits for each page >But i have problems using the TreeSiteMapViewHelper. > >I mean i made 2 tests. >The first i copy sitemap.jsp and sitemap.inc >I rename them to stats.inc and stats.jsp >I change the include and the jsp > >and this new jsp make an error. >NullPointerException >In fact, this is the same probleme as is if make a new jsp and copy paste >the beginning of the code. >the treeJahiaSiteMap is null. > >[CODE] > HashMap engineMap = > (HashMap)request.getAttribute("org.jahia.engines.EngineHashMap"); > String engineURL = (String)engineMap.get("engineUrl"); > TreeSiteMapViewHelper treeJahiaSiteMap = > (TreeSiteMapViewHelper)engineMap.get("treeJahiaSiteMap"); > >for (int i = 0; i < treeJahiaSiteMap.size(); i++) { ............} > >[/CODE] > >Is there any way to have all the page of the current site and get for each >page the page counter ? > >How to use correctly this TreeSiteMapViewHelper ? >What is bad on this code ? > >For injecting data from other database i think i'm gonna make webapps. >Another question, lucene will not look in those webapps? >Is there any way to permit the search on the webapps ? > >thanks and pleaz excuse my bad english >Have a nice day all ...... > > >-----Message d'origine----- >De : Serge Huber [mailto:[EMAIL PROTECTED] >Envoy� : mardi 12 octobre 2004 14:40 >� : [EMAIL PROTECTED] >Objet : Re: Counter Page > > >Delaeter G�ric wrote: > > >Hello Everybody > >I'm new to jahia and i have a few questions. > > > >Is there any way to add a page counter (don't know the right english > word, sorry ) ? > >Add a page couter in each page and have a page with all the statistics. > > > > >Actually JahiaPage objects have a counter associated with them, that you >can access through the JahiaPage.getCounter() method. Note that this >counter is only updated on non-cache hits. > > >Secondly, i want to know if there is a way to "inject" data directly to > the jahia tables. > >I mean i make a template for a page that i want, and i insert all the > rows in the jahia tables directly ... ? Is there any side effect ? (re > index for the search engine or things like that ... ) > > > > >Well I wouldn't recommend this, especially if you are a novice Jahia >user. Basically Jahia uses a lot of object caches for the content stored >in the database. Now if you are populating the tables while Jahia is not >running this is another problem altogether. You would indeed have to >reindex the whole content, but you would also need to understand very >well the object model, including versioning, workflow states and >multilingual issues in order to be sure you are not corrupting anything. > >We have an introduction to the object model in the Template Developer >Guide, but it doesn't cover all the functionalites and it doesn't map to >the database. Most users therefore go through the API instead to do >special operations. > >Regards, > Serge Huber.
-------=[ pvollenweider at jahia dot com ]=--------- Jahia : A collaborative source CMS and Portal Server www.jahia.org Community and product web site www.jahia.com Commercial services company
-------=[ pvollenweider at jahia dot com ]=--------- Jahia : A collaborative source CMS and Portal Server www.jahia.org Community and product web site www.jahia.com Commercial services company
