This forum is for churches and ministries using Web-Empowered Church tools or packages. If you are a WEC customer, please submit a ticket. If you are reporting a bug with one of our plugins, please email us. If you are a business entity and want help that you cannot find here, please look at our services.

Notice: we are using new forum software and most messages from last 2 years were transferred. If you had an account before, please login to post a message on the forum.

Topic with no new replies

Title and Meta Tags


Author Message
Written on: 11/23/2011
Paul Bucalo
Topic creator
registered since: 02/10/2008
Posts: 5
I'm trying to figure out how to insert data from the profile into title and meta description tags.
I'm using this typoscript that I found for tt_news, but I can't seem to make it work.

[code]
config.noPageTitle = 2
temp.bioTitle = COA
temp.bioTitle {
10 = RECORDS
10 {
source = {GPvar:wec_staffdirectory|tx_wec_staffdirectory_pi1}
source.insertData = 1
tables = tx_wecstaffdirectory_info
conf.tx_wec_staffdirectory_pi1 >
conf.tx_wec_staffdirectory_pi1 = TEXT
conf.tx_wec_staffdirectory_pi1.field = misc
}
}

page.headerData.10 < temp.bioTitle
[/code]

I don't even know if I'm looking at the right solution. I figured I could get the data in there somehow through TypoScript, but I'm open to any solution.

Thanks,
online_p
Written on: 11/23/2011
Paul Bucalo
Topic creator
registered since: 02/10/2008
Posts: 5
Here's another method I'm trying but not successful with:

[code]
config.noPageTitle = 2
page.headerData.20 = TEXT
page.headerData.20.value = xx
page.headerData.20.wrap = <title>|
page.headerData.40 = TEXT
page.headerData.40.value = xx
page.headerData.40.noTrimWrap=| - ||
page.headerData.50 = TEXT
page.headerData.50.value = </title>

[globalVar = HTTP_GET_VARS|tx_wecstaffdirectory_pi1|single>0]
page.headerData.40 = CONTENT
page.headerData.40{
table=tx_wecstaffdirectory_info
# wrap the whole element
wrap=|
# the SQL-Query
select{
max=1
selectFields=misc
pidInList = 25
andWhere.data = global:HTTP_GET_VARS|tx_wecstaffdirectory_pi1|single
andWhere.wrap = uid='|'
}
renderObj=COA
renderObj{
5=TEXT
5{
noTrimWrap=| - ||
field=misc
}
}
}
[/code]

I adapted this from here: http://www.infohit.net/blog/post/typo3-setting-the-page-title-tag-to-the-subject-of-a-blog-post.html
Written on: 11/25/2011
Paul Bucalo
Topic creator
registered since: 02/10/2008
Posts: 5
This code works with tt_news, but not the staff directory.
I still can't figure out why:

[code]
config.noPageTitle = 2
# substitute pagetitle with title of staff page
plugin.tx_wecstaffdirectory_pi1.substitutePagetitle = 0

[PIDupinRootline = 25]
temp.bioTitle = CONTENT
temp.bioTitle {
table = tx_wecstaffdirectory_info
select {
//max=1
selectFields = misc
//pidInList = 25
where = uid={GP:tx_wecstaffdirectory_pi1|curstaff}
//andWhere.data = global:HTTP_GET_VARS|tx_wecstaffdirectory_pi1|curstaff
//andWhere.wrap = uid='|'
}
}

temp.bioTitle.wrap = <title>|</title>
page.headerData.1 < temp.bioTitle

[end]
[/code]

I know I'm close because this works for my tt_news page (I substitute the PID for the single news PID and I substitute the UID for {GP:tx_ttnews|tt_news} which is the GET array.
banghead.gif
Any help appreciated
-p
Written on: 11/29/2011
Paul Bucalo
Topic creator
registered since: 02/10/2008
Posts: 5
My first attempt was the closest to correct.
Here's the solution: http://www.rare-web.com/posts/archive/2011/november/28/article/custom-title-and-meta-tags.html