[TYPO3-english] Option Split assistance

Jackson, Mary MaryJackson at creighton.edu
Mon Jun 22 18:23:39 CEST 2009


I apologize if this is repost, question was rejected before

I need help with an option split used to create a menu output for a
Javascript.

The pagetree is this

page 1
     page 1a
     page 1b
page 2
     page 2a
     page 2b

etc

The javasript needs 

<ul id="page1">
       <li>page 1a</li>
       <li>page 1b</li>
</ul>
','
<ul id="page2">
       <li>page 2a</li>
       <li>page 2b</li>
</ul>

No last ','

I have all of it working great!  Except that I cannot get the option
split to drop a last ',' 

and of course that throws a javascript error.

I've read (and re-read and taken excedrine and re-read) about options
splits and I thought I had it right but I still get a closing ',' behind
the last </ul>

Typoscript:

# BUILD SITE MENU
    temp.menu = HMENU
    temp.menu.special = directory
    temp.menu.special.value = 40543
    temp.menu.entryLevel = 1
    temp.menu.1 = TMENU
    temp.menu.1 {
        noBlur = 1
        expAll = 1
        wrap = |
        NO {
          doNotLinkIt = 1
	  expAll=1
	  doNotShowLink = 1
	  stdWrap=TEXT
	  allWrap = <ul id="subnav_{field:alias}">|
          allStdWrap.insertData=1
        }
    }

    temp.menu.2 = TMENU
    temp.menu.2 {
        wrap = |</ul>',' |*| |</ul>','  |*| |</ul>
        noBlur = 1
        expAll = 1
        NO {
        wrapItemAndSub = <li>|</li>
        stdWrap.htmlSpecialChars = 1
        }
    }

I sure could use some help.  

Thanks all! 


Mary Jackson
Front End Web Developer
Division of Information Technology
Creighton University
MaryJackson at creighton.edu
280-3870
 
All successful life is
Adaptable,
Opportunistic,
Tenacious,
Interconnected, and
Fecund.
Understand this.
Use it.
-- Earthseed . The books of the Living --

-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of
typo3-english-request at lists.netfielders.de
Sent: Monday, June 22, 2009 4:10 A
To: typo3-english at lists.netfielders.de
Subject: TYPO3-english Digest, Vol 69, Issue 67

Send TYPO3-english mailing list submissions to
	typo3-english at lists.netfielders.de

To subscribe or unsubscribe via the World Wide Web, visit
	
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
or, via email, send a message with subject or body 'help' to
	typo3-english-request at lists.netfielders.de

You can reach the person managing the list at
	typo3-english-owner at lists.netfielders.de

When replying, please edit your Subject line so it is more specific than
"Re: Contents of TYPO3-english digest..."


Today's Topics:

   1. Re: Spacers and other beginner questions (Marian Schedenig)
   2. Re: Spacers and other beginner questions (Jigal van Hemert)
   3. t3blog and crop (Roberto Torresani)
   4. Re: t3blog and crop (Thomas Kieslich)
   5. Re: [OT] Spacers and other beginner questions (Andreas Burg)
   6. Re: [OT] Spacers and other beginner questions (Marian Schedenig)
   7. Re: [OT] Spacers and other beginner questions (Andreas Burg)
   8. How to generate automated alt attributes for images?
      (Radoslav Kolarov)
   9.  Edit record suddenly empty (Peter)
  10. Re: $GLOBALS["TSFE"]->feuser (alex widschwendter)
  11. Re: Edit record suddenly empty (Philipp Holdener)


----------------------------------------------------------------------

Message: 1
Date: Sun, 21 Jun 2009 14:44:49 +0200
From: Marian Schedenig <m.sched at gmx.at>
Subject: Re: [TYPO3-english] Spacers and other beginner questions
To: typo3-english at lists.netfielders.de
Message-ID:
	<mailman.1.1245588290.23445.typo3-english at lists.netfielders.de>
Content-Type: text/plain; charset="UTF-8"

Jigal van Hemert wrote:

> Spacers are indeed meant for making seperators. In TSRef you can read 
> [1] that:
> Spacers are pages of the doktype "Spacer". These are not viewable 
> pages but "placeholders" which can be used to divide menuitems.

Which is exactly what I want. :)

> For example:
> 
> lib.menu = HMENU
> lib.menu {
>    1 = TMENU
>    1 {
>      NO {
>        wrapItemAndSub = <div class="normal-menuitem">|</div>
>      }
>      SPC = 1
>      SPC {
>        wrapItemAndSub = <div class="spacer_menuitem">|</div>
>        stdWrap.field = title
>      }
>    }
> }

I tried it this way, hoping that perhaps not having specified the
stdWrap field was the problem. Still nothing - all other menu items are
fine but the spacers don't even contribute a single character to the
resulting HTML code.

Do I perhaps have to add some include to my template I don't know about?

> AMENU is short for "Archive MENU", so in fact you *are* using the 
> archive :-)

Yes, I'm aware of that - though I probably should have pointed it out.
:)

> The manual of tt_news [2] tells that a LATEST element "lists only 
> non-archived new-records, and it is not influenced by the archive menu

> selection. (This behaviour can be changed by setting 
> ?displayArchivedInLatest? to 1 -> then LATEST will act like a normal 
> LIST)"

Ah! I was digging around in the archive sections of the docs, so I was
aware that LIST generally ignores the archive settings, but didn't see
the bit about LATEST - seems to work fine now!

>> Below each blog comment, I want to display something like:
>> Posted by Musgit on Saturday, May 9th, 2009 at 04:52 in Blog Test, 
>> Sub 2
>> 
> TYPO3 does not like to show visitors links to pages which are not 
> accessible and does not like to show empty links. So if you let TYPO3 
> build the links for you (i.e. you do not code the <a href stuff
> yourself) it will simply not render a link if that field is empty.

Makes sense. I obviously shouldn't put it in my ve_guestbook HTML
template like this (my current solution to at least show *something*):

Posted by <a
href="###GUESTBOOK_HOMEPAGE_URL###">###GUESTBOOK_SURNAME###</a>
on ###GUESTBOOK_DATE###

I suppose the correct way to do it is to put a stdWrap around the
###GUESTBOOK_SURNAME### field (either that, or create a new field with
the link stdWrapped around the content of ###GUESTBOOK_SURNAME###) in my
site's template setup - what I don't know is how I can do that. :)

Thanks a lot,
Marian.

--
Hofstadter's law: "It always takes longer than you think, even when you
take account of Hofstadter's law".


------------------------------

Message: 2
Date: Sun, 21 Jun 2009 16:55:17 +0200
From: Jigal van Hemert <jigal at xs4all.nl>
Subject: Re: [TYPO3-english] Spacers and other beginner questions
To: typo3-english at lists.netfielders.de
Message-ID:
	<mailman.1.1245596119.9824.typo3-english at lists.netfielders.de>
Content-Type: text/plain; charset=UTF-8; format=flowed

Marian Schedenig wrote:
>> lib.menu = HMENU
>> lib.menu {
>>    1 = TMENU
>>    1 {
>>      NO {
>>        wrapItemAndSub = <div class="normal-menuitem">|</div>
>>      }
>>      SPC = 1
>>      SPC {
>>        wrapItemAndSub = <div class="spacer_menuitem">|</div>
>>        stdWrap.field = title
>>      }
>>    }
>> }
> 
> I tried it this way, hoping that perhaps not having specified the
stdWrap 
> field was the problem. Still nothing - all other menu items are fine
but the 
> spacers don't even contribute a single character to the resulting HTML
code.

I first tried this piece of code before posting it, so I know for 
certain that it works.
These spacer pages don't happen to have the "Hide" option activated?

The test page tree looks like this:
+ O "root"
   +- [] Home ( -> first subpage)
   |   +- [] Home
   |   +- [] Single view for news
   |   +- ^v spacertitle
   |   +- [] Another page
   +- [=] Template storage
   +- [=] News items

And the menu it generates is:
<div class="normal-menuitem">
   <a href="index.php?id=7" onfocus="blurLink(this)">Home</a>
</div>
<div class="normal-menuitem">
   <a href="index.php?id=5" onfocus="blurLink(this)">Single view for 
news</a>
</div>
<div class="spacer_menuitem">spacertitle</div>
<div class="normal-menuitem">
   <a href="index.php?id=6" onfocus="blurLink(this)">Another page</a>
</div>

You have dubble checked the spelling of everything? (upper/lower case!)
Typoscript rather ignores everything it doesn't 'know'. It's a 
declarative language and it gladly accepts any property because it may 
be used by some other code in the system.

> Makes sense. I obviously shouldn't put it in my ve_guestbook HTML
template 
> like this (my current solution to at least show *something*):
> 
> Posted by <a
href="###GUESTBOOK_HOMEPAGE_URL###">###GUESTBOOK_SURNAME###</a> 
> on ###GUESTBOOK_DATE###
> 
> I suppose the correct way to do it is to put a stdWrap around the 
> ###GUESTBOOK_SURNAME### field (either that, or create a new field with
the 
> link stdWrapped around the content of ###GUESTBOOK_SURNAME###) in my
site's 
> template setup - what I don't know is how I can do that. :)

I took a quick look in the ve_guestbook code, but it has no support for 
a stdWrap on GUESTBOOK_SURNAME (and many other fields). There are some 
fields with stdWrap support, but for some reason the other hasn't done 
that for all markers.
You can always contact the author and ask him to add this (it's actually

very little work and in my opinion it's something an extension author 
should provide on all fields)

-- 
Jigal van Hemert.


------------------------------

Message: 3
Date: Sun, 21 Jun 2009 20:14:12 +0200
From: Roberto Torresani <erreti at gmail.com>
Subject: [TYPO3-english] t3blog and crop
To: TYPO3 English <typo3-english at lists.netfielders.de>
Message-ID:
	
<mailman.12828.1245608057.3168.typo3-english at lists.netfielders.de>
Content-Type: text/plain; charset=ISO-8859-1

Hi!
is possible (and if yes, how :) ) crop the text of a post in the list of
the
blog?

Thanks
Roberto


------------------------------

Message: 4
Date: Sun, 21 Jun 2009 21:22:39 +0200
From: Thomas Kieslich <thomaskieslich at gmx.net>
Subject: Re: [TYPO3-english] t3blog and crop
To: typo3-english at lists.netfielders.de
Message-ID:
	<mailman.1.1245612169.32708.typo3-english at lists.netfielders.de>
Content-Type: text/plain; charset="us-ascii"

Am Sun, 21 Jun 2009 20:14:12 +0200 schrieb Roberto Torresani:

> Hi!
> is possible (and if yes, how :) ) crop the text of a post in the list
of the
> blog?
> 
> Thanks
> Roberto

Try to use ###MORE### in first Text element.


------------------------------

Message: 5
Date: Mon, 22 Jun 2009 00:01:37 +0200
From: Andreas Burg <typo3 at andreasburg.de>
Subject: Re: [TYPO3-english] [OT] Spacers and other beginner questions
To: typo3-english at lists.netfielders.de
Message-ID:
	<mailman.1.1245621702.15129.typo3-english at lists.netfielders.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Marian

I think in general it's better to open one thread for each question to
get more and better help.

-- 
Andreas

Mailing list rules & guidelines (Mailing list Regeln & Leitfaden):
http://typo3.org/community/mailing-lists/
http://typo3.org/community/mailing-lists/mailing-list-rules-guidelines/


------------------------------

Message: 6
Date: Mon, 22 Jun 2009 00:45:58 +0200
From: Marian Schedenig <m.sched at gmx.at>
Subject: Re: [TYPO3-english] [OT] Spacers and other beginner questions
To: typo3-english at lists.netfielders.de
Message-ID:
	<mailman.1.1245624358.2650.typo3-english at lists.netfielders.de>
Content-Type: text/plain; charset="ISO-8859-1"

Andreas Burg wrote:

> I think in general it's better to open one thread for each question to
get
> more and better help.

I agree. Normally I'd do that; I just didn't want to spam the list with 
three separate, possibly very trivial threads at once.

Cheers,
Marian.

-- 
Hofstadter's law: "It always takes longer than you think,
even when you take account of Hofstadter's law".


------------------------------

Message: 7
Date: Mon, 22 Jun 2009 02:06:52 +0200
From: Andreas Burg <typo3 at andreasburg.de>
Subject: Re: [TYPO3-english] [OT] Spacers and other beginner questions
To: typo3-english at lists.netfielders.de
Message-ID:
	<mailman.1.1245629217.2465.typo3-english at lists.netfielders.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Marian

> I agree. Normally I'd do that; I just didn't want to spam the list
with 
> three separate, possibly very trivial threads at once.

What is trivial to some people could be hard for others. That would be
no spam.

Good luck

-- 
Andreas

Mailing list rules & guidelines (Mailing list Regeln & Leitfaden):
http://typo3.org/community/mailing-lists/
http://typo3.org/community/mailing-lists/mailing-list-rules-guidelines/


------------------------------

Message: 8
Date: Mon, 22 Jun 2009 09:44:27 +0300
From: Radoslav Kolarov <radoslav.kolarov at osceola.de>
Subject: [TYPO3-english] How to generate automated alt attributes for
	images?
To: typo3-english at lists.netfielders.de
Message-ID:
	
<mailman.12926.1245653091.3168.typo3-english at lists.netfielders.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi,
I want to ask if there is a way to generate automated alt attributes for

img tags - for example this alt attribute to be image name or something 
similar?

Thanks


------------------------------

Message: 9
Date: Mon, 22 Jun 2009 09:41:52 +0200
From: Peter <ptrl at gmx.de>
Subject: [TYPO3-english]  Edit record suddenly empty
To: typo3-english at lists.netfielders.de
Message-ID:
	<mailman.1.1245656512.9130.typo3-english at lists.netfielders.de>
Content-Type: text/plain; charset=UTF-8

Hi,

I am just writing an extension. And while cleaning up the kickstarter
code I must have deleted sth. essential:

Suddenly for one type of records when I enter the edit record view
(clicking the pen in the extented list view) I cannot see the forms
anymore. There is nothing as if there are no fields at all in this type
of record.

If I want to create a record in that table with the create record
function in the list view it works out fine.

Can anybody please give me a hint in which extension file I might
deleted what?

Thanks a lot
Peter


------------------------------

Message: 10
Date: Mon, 22 Jun 2009 09:55:56 +0200
From: alex widschwendter <a.widschwendter at mediares.at>
Subject: Re: [TYPO3-english] $GLOBALS["TSFE"]->feuser
To: typo3-english at lists.netfielders.de
Message-ID:
	<mailman.1.1245657457.27706.typo3-english at lists.netfielders.de>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed

hi bjarne,

i think this i a bug in current (non stable) 4.3 version.
http://bugs.typo3.org/view.php?id=10240

alex

> I followed your idea, which is what I need, but I gets the following 
> message:
> 
> PHP Fatal error: Call to a member function push() on a non-object in 
> C:\BBH-DATA\Web\t3_4_3\typo3\sysext\cms\tslib\class.tslib_fe.php on
line 599
> 
> The line which gives the error:
> 598    protected function initCaches() {
> 599        $GLOBALS['TT']->push('Initializing the Caching System','');
> 600
> 601        $GLOBALS['typo3CacheManager'] = 
> t3lib_div::makeInstance('t3lib_cache_Manager');
> 602        $GLOBALS['typo3CacheFactory'] = 
> t3lib_div::makeInstance('t3lib_cache_Factory');
> 603 
>
$GLOBALS['typo3CacheFactory']->setCacheManager($GLOBALS['typo3CacheManag
er']);
> ect
> ect
> 
> Any idea?
> 
> Regards
> Bjarne
> 
> "alex widschwendter" <a.widschwendter at mediares.at> wrote in message 
> news:mailman.1.1245417613.18132.typo3-english at lists.netfielders.de...
>> hi,
>>
>>> In a rightclickmenu I need to get user information, but the values
in 
>>> $GLOBALS["TSFE"]->feuser are empty, and therefor not init. The menu
is a 
>>> ajax menu, and so the php page who generate the men is a "stand
alone" 
>>> file. With a init.php (stole and rewrited "/typo3/init.php") I have
set 
>>> up the difference variables, but not the $GLOBALS["TSFE"]->feuser.
>>>
>>> Does anyone know where in the core $GLOBALS["TSFE"]->feuser is set,
or 
>>> better which T3 class do I have to include on me standalone page???
>> afaik you could use an eid script for that.
>>
>> a template for you script:
>>
>> <?php
>> require_once(PATH_tslib.'class.tslib_pibase.php');
>> //require_once(PATH_tslib.'class.tslib_fe.php');
>> // Exit, if script is called directly (must be included via eID in 
>> index_ts.php)
>> //if (!defined ('PATH_typo3conf')) die ('Could not access this script

>> directly!');
>>
>> // Initialize FE user object:
>> $feUserObj = tslib_eidtools::initFeUser();
>>
>> // Connect to database:
>> tslib_eidtools::connectDB();
>>
>> you have to enable the eid script in the ext_localconf.php of your 
>> extension:
>>
>> $TYPO3_CONF_VARS['FE']['eID_include']['addToBasket'] = 
>> 'EXT:mdrs_24safe_shop/addToBasket.php';
>>
>> hth alex 
> 
> 


------------------------------

Message: 11
Date: Mon, 22 Jun 2009 11:08:04 +0200
From: Philipp Holdener <philipp at holdener.ch>
Subject: Re: [TYPO3-english] Edit record suddenly empty
To: typo3-english at lists.netfielders.de
Message-ID:
	<mailman.1.1245661684.7839.typo3-english at lists.netfielders.de>
Content-Type: text/plain; charset=UTF-8; format=flowed

Peter schrieb:
> Hi,
> 
> I am just writing an extension. And while cleaning up the kickstarter
> code I must have deleted sth. essential:
> 
> Suddenly for one type of records when I enter the edit record view
> (clicking the pen in the extented list view) I cannot see the forms
> anymore. There is nothing as if there are no fields at all in this
type
> of record.
> 
> If I want to create a record in that table with the create record
> function in the list view it works out fine.
> 
> Can anybody please give me a hint in which extension file I might
> deleted what?
> 
> Thanks a lot
> Peter


Hi

I think I had the same problem because of a wrong type-field!
after setting it to "none" everything worked fine again.
If you use this opition you have to code it somewhere!? (I think!?)

best wishes
Philipp


------------------------------

_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

End of TYPO3-english Digest, Vol 69, Issue 67
*********************************************


More information about the TYPO3-english mailing list