Discussion:
[Typo3] List current page Title and more.
Trent Stromkins
2005-04-07 05:36:48 UTC
Permalink
I am stuck, I have tried researching HMENU, and can not find how to
make a dynamic heading based on the title of the current PID. So lets
say you went to a page, the title of that page would be listed, in the
corner lets say. Any suggestions on what tS I need?

I am also wanting to have a menu that list the Parent page in the
tree. ie: Page 4 would have Page 2 listed, but not Page 3. That would
be the same in Page 5, where Page 3 is the page that is listed.

Page 1
|
|--Page 2--Page 4
|--Page 3--Page 5

Thanks.
--
Trent Stromkins
www.digitalgumball.com
Kraft Bernhard
2005-04-07 08:22:31 UTC
Permalink
Trent Stromkins wrote:
> I am stuck, I have tried researching HMENU, and can not find how to
> make a dynamic heading based on the title of the current PID. So lets
> say you went to a page, the title of that page would be listed, in the
> corner lets say. Any suggestions on what tS I need?

# ------------------ HEADLINE ----- BEGIN --------------------
temp.headline = TEXT
temp.headline {
field = subtitle
ifEmpty.field = title
}
# ------------------ HEADLINE ----- END --------------------

Will show the subtitle and if empty the title.
Just:
temp.headline {
field = title
}
Will show just the title ... and

temp.headline {
field = subtitle // title
}

is another possibility to use the subtitle and if it's empty the title (just another method
to achieve it)


> Page 1
> |
> |--Page 2--Page 4
> |--Page 3--Page 5

I don't understand this ....

Should page 2 be a subpage of page 1 ? and Page 4 a subpage of page 2 ?
Do you want it like:
Page 1
|
|--- Page 2 -- Page 2.1
|--- Page 2 -- Page 2.2
|--- Page 3 -- Page 3.1
|--- Page 3 -- Page 3.2

When this is what you want I think it gets complicated ...


greets,
Bernhard
--
Kraft Bernhard
MOKKA Medienagentur <http://www.mokka.at>
T: +43 - 1 - 895 33 33 - 50
JoH
2005-04-07 08:40:36 UTC
Permalink
>>> --Page 2--Page 4
>>> --Page 3--Page 5
>
> I don't understand this ....

Sounds like a breadcrumb menu to me.
Something like:
you are here --> Home | Level 1 page | Level 2 page | current page

@Trent: Is this what you wanted?

Joey

--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have now clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau
Trent Stromkins
2005-04-07 15:48:14 UTC
Permalink
Very simular. I tried using a entrypoint menu, and it lists every page
in the level, yet I only want to list the specific parent that resides
in that level.

For example, you are in a product based site. You enter the Products
section, which is at the same level as Support and About Company in
the page structure. When I am in the product pages, I want the page
title "Products" to be listed in a specificly designed area, so the
user knows where they are currently.

ascii version:)

(PRODUCTS) <--this is an item that says you are in Products,
it would change to Support on the support
page.

[ Products | Support | About Company ] <--Nav menu


You guys following me? For even more convienence, I wanted to display
the products item even when I am in child pages of the products page.
If that is too much to ask, then the title of the page works for me.


On Apr 7, 2005 1:40 AM, JoH <info at cybercraft.de> wrote:
> >>> --Page 2--Page 4
> >>> --Page 3--Page 5
> >
> > I don't understand this ....
>
> Sounds like a breadcrumb menu to me.
> Something like:
> you are here --> Home | Level 1 page | Level 2 page | current page
>
> @Trent: Is this what you wanted?
>
> Joey
>
> --
> Wenn man keine Ahnung hat: Einfach mal Fresse halten!
> (If you have now clues: simply shut your gob sometimes!)
> Dieter Nuhr, German comedian
> openBC: http://www.openbc.com/go/invuid/Jo_Hasenau
>
>
> _______________________________________________
> Typo3-english mailing list
> Typo3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>


--
Trent Stromkins
www.digitalgumball.com
Kraft Bernhard
2005-04-07 19:23:45 UTC
Permalink
Trent Stromkins wrote:
> (PRODUCTS) <--this is an item that says you are in Products,
> it would change to Support on the support
> page.

Just do as I wrote in my previous posting:

Put this in your TS Setup:
temp.headline {
field = title
}

And then do something like

marker.headline < temp.headline
or
subparts.headline < temp.headline

depending on which kind of template parsing you are using. Or if you ues TemplaVoila
map the field where the title should go to a TypoScript Object Path and enter
lib.headline as path.
Of course you would have to change
temp.headline {
to
lib.headline {


If you have no clue what I am talking about at all read Modern Template Building Part 1
or Futuristic Template Building from the Documentation section of typo3.org


greets,
Bernhard
Trent Stromkins
2005-04-07 19:29:33 UTC
Permalink
SWEETNESS. Yes I am using TempVoila. That is EXACTLY what I was
looking for. Thank you very much.

--
Trent Stromkins
www.digitalgumball.com
Trent Stromkins
2005-04-07 19:50:45 UTC
Permalink
Ok, I setup the items in the Template and the TV Template as
lib.headline, and I am not getting any output.

Template TypoScript Setup code:

lib.headline {
field = title
}

TV Template Element

TypoScript Object Path
Path: lib.headline


Did I miss something?

--
Trent Stromkins
www.digitalgumball.com
Kraft Bernhard
2005-04-07 21:04:20 UTC
Permalink
Trent Stromkins wrote:

> Did I miss something?

If you had a different kind of Editing Type before and switche that I noticed that
TV does not switch cleanly ... I do not know i I should post this as a bug because
nobod has confirmed it ... and i didn't hear about it anywhere else. And believe I'm
watching the list closely :)

It helped for me to delete the TO and the DS, then quit the browser (so the templating
session gets closed) and then do the mapping again ... if you have many TO's for the same
DS I'm very sorry ... you could also try to clean up TO and DS by hand ... look what shouldn't
be there for a TO object path

I guess if the TCEforms XML entry stays in the new TS Obj Path element then it wont work.
Pherhaps also some other ... just make a completly new TS Obj Path element in your DS with
the mapping tool and then edit the DS manually and copy over the newly created one into
the old element replacing it. then adjust the labels and such stuff ...

greets,
Bernhard
Trent Stromkins
2005-04-07 21:11:50 UTC
Permalink
Kraft,

I replaced the TO, DS, which is always a pain for a lot of pages, and
still no result. Here is my template script:

lib.headline {
field = title
}

# Menu 0 cObject
lib.menu_0 = HMENU
lib.menu_0.special = list
lib.menu_0.special.value = 1,51
lib.menu_0.1 = TMENU
lib.menu_0.1 {
# Normal state properties
NO.allWrap = |&nbsp;&nbsp;
NO.stdWrap.htmlSpecialChars = 1
}

# Menu 1 cObject
lib.menu_1 = HMENU
# First level menu-object, textual
lib.menu_1.1 = TMENU
lib.menu_1.1 {
# Normal state properties
NO.allWrap = |&nbsp;&nbsp;&nbsp;&nbsp;
NO.stdWrap.htmlSpecialChars = 1
}


# Menu 2 cObject
lib.menu_2 = HMENU
lib.menu_2.entryLevel = 1
# Second level menu-object, textual
lib.menu_2.1 = TMENU
lib.menu_2.1 {
# Normal state properties
NO.allWrap = :&nbsp;|&nbsp;
NO.stdWrap.htmlSpecialChars = 1
}

# Menu 3 cObject
lib.menu_3 = HMENU
lib.menu_3.entryLevel = 2
# Second level menu-object, textual
lib.menu_3.1 = TMENU
lib.menu_3.1 {
# Normal state properties
NO.allWrap =|<br>
NO.stdWrap.htmlSpecialChars = 1
}

#Print Version URL:
lib.print_url = TEXT
lib.print_url.value = index.php?id={page:uid}&print=1&no_cache=1
lib.print_url.htmlSpecialChars = 1
lib.print_url.insertData = 1
[globalVar = GP:print > 0]
lib.print_url.value = index.php?id={page:uid}
[global]


# Default PAGE object:
page = PAGE
page.typeNum = 0
page.10 = USER
page.10.userFunc = tx_templavoila_pi1->main_page

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


I dont see any issues, but I have not used Typo long enough to know. I
could always write a PHP script to get the page title, but I want to
do it natively. Is there anything else I should look at to trouble
shoot the element failure?

--
Trent Stromkins
www.digitalgumball.com
Kraft Bernhard
2005-04-08 03:17:24 UTC
Permalink
Trent Stromkins wrote:
> lib.headline {
> field = title
> }

Sorry... I must be too tired.

lib.headline = TEXT
lib.headline.field = title


that's it ... or use braces if you prefer ... the = TEXT was missing


greets,
Bernhard
Trent Stromkins
2005-04-08 15:20:06 UTC
Permalink
I am not getting any output. It looks like I am going to have to enter
it manually. :( Oh well.



On Apr 7, 2005 8:17 PM, Kraft Bernhard <kraftb at kraftb.at> wrote:
> Trent Stromkins wrote:
> > lib.headline {
> > field = title
> > }
>
> Sorry... I must be too tired.
>
> lib.headline = TEXT
> lib.headline.field = title
>
> that's it ... or use braces if you prefer ... the = TEXT was missing
>
> greets,
> Bernhard
> _______________________________________________
> Typo3-english mailing list
> Typo3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>


--
Trent Stromkins
www.digitalgumball.com
Christopher
2005-04-08 15:27:10 UTC
Permalink
Hi,

--- Trent Stromkins <bmx269 at gmail.com> wrote:
> I am not getting any output. It looks like I am going to have to enter
> it manually. :( Oh well.
>
>
>
> On Apr 7, 2005 8:17 PM, Kraft Bernhard <kraftb at kraftb.at> wrote:
> > Trent Stromkins wrote:
> > > lib.headline {
> > > field = title
> > > }
> >
> > Sorry... I must be too tired.
> >
> > lib.headline = TEXT
> > lib.headline.field = title
> >
> > that's it ... or use braces if you prefer ... the = TEXT was missing
> >

This way may work better with Templavoila:

lib.headline = TEXT
lib.headline.data = page:title

-Christopher

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
JoH
2005-04-08 15:36:18 UTC
Permalink
> This way may work better with Templavoila:
>
> lib.headline = TEXT
> lib.headline.data = page:title

And since you wanted to display the title for subpages too:

lib.headline = TEXT
lib.headline.data = leveltitle:x

replace x with the level of your "Products" page.

Have a look at TSref --> datatype reference --> getText
There's a good explanation for leveltitle.

Joey

--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have now clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau
Trent Stromkins
2005-04-10 04:53:39 UTC
Permalink
Thanks Guys, That totally worked perfectly.
--
Trent Stromkins
www.digitalgumball.com
Peter Russ
2005-04-08 15:34:51 UTC
Permalink
Trent Stromkins schrieb:

> I am stuck, I have tried researching HMENU, and can not find how to
> make a dynamic heading based on the title of the current PID. So lets
> say you went to a page, the title of that page would be listed, in the
> corner lets say. Any suggestions on what tS I need?
>
> I am also wanting to have a menu that list the Parent page in the
> tree. ie: Page 4 would have Page 2 listed, but not Page 3. That would
> be the same in Page 5, where Page 3 is the page that is listed.
>
> Page 1
> |
> |--Page 2--Page 4
> |--Page 3--Page 5
>
> Thanks.
Do I get it right:
you want the _COMPLETE_ menu structure with all items OPENED?

If an item has 1 sub it should go like this:
1-sub
if an item has several subs it should go like that:
1
I-sub1
I-sub2

So might look like:

1
I-sub1-sub1.1-sub1.2
I I-sub1.2.1-sub1.2.2
I-sub2-sub2.1
I-sub3.sub3.1


Regs. Peter.
Loading...