Илья
03.11.2010, 18:46
Как можно сделать ссылку на элемент контента, а не на целую страницу?
Пробую взять пример из экста rgmoodalbox (http://typo3.org/extensions/repository/view/rgmoodalbox/current/)
здесь в примере все работает нормально: пример (http://www.rggooglemap.com/en/dev/rgmoodalbox/pages-content.html) да и без лайтбокса тоже вот (http://www.rggooglemap.com/index.php?id=174&ce=55&no_cache=1)
Get a single content element
To get a single content element inside a lightbox you just need a bit of TS Code. Create somewhere a page and add this TS
# TS CODE
# get tt_content elements
temp.record = COA
temp.record {
10 = RECORDS
10 {
tables = tt_content
source.data = GPvar:ce
if.isTrue.data = GPvar:ce
dontCheckPid = 1
}
}
# get news reocrds
temp.record2 = COA
temp.record2 {
10 = RECORDS
10 {
tables = tt_news
source.data = GPvar:news
if.isTrue.data = GPvar:news
dontCheckPid = 1
}
}
# load it into the page-Object
page.10 >
page.10 < temp.record
page.20 < temp.record2
All what you now have to do is call a url like this for content elements:
index.php?id=174&ce=55&no_cache=1
and this url for tt_news records:
index.php?id=174&news=25&no_cache=1
174 is the ID of the page where you saved the TS Code.
Modify links on the fly
Насколько я понял, в примере на страницу с ID 174 пихают этот TS код, и потом при вызове изменяют только ce=55 (идентификатор контент элемента)
Убрал в коде новости получил:
# TS CODE
# get tt_content elements
temp.record = COA
temp.record {
10 = RECORDS
10 {
tables = tt_content
source.data = GPvar:ce
if.isTrue.data = GPvar:ce
dontCheckPid = 1
}
}
page.10 >
page.10 < temp.record
Но при вызове вижу не контент элемент отдельно, а целиком страницу, где он расположен.
Пробую взять пример из экста rgmoodalbox (http://typo3.org/extensions/repository/view/rgmoodalbox/current/)
здесь в примере все работает нормально: пример (http://www.rggooglemap.com/en/dev/rgmoodalbox/pages-content.html) да и без лайтбокса тоже вот (http://www.rggooglemap.com/index.php?id=174&ce=55&no_cache=1)
Get a single content element
To get a single content element inside a lightbox you just need a bit of TS Code. Create somewhere a page and add this TS
# TS CODE
# get tt_content elements
temp.record = COA
temp.record {
10 = RECORDS
10 {
tables = tt_content
source.data = GPvar:ce
if.isTrue.data = GPvar:ce
dontCheckPid = 1
}
}
# get news reocrds
temp.record2 = COA
temp.record2 {
10 = RECORDS
10 {
tables = tt_news
source.data = GPvar:news
if.isTrue.data = GPvar:news
dontCheckPid = 1
}
}
# load it into the page-Object
page.10 >
page.10 < temp.record
page.20 < temp.record2
All what you now have to do is call a url like this for content elements:
index.php?id=174&ce=55&no_cache=1
and this url for tt_news records:
index.php?id=174&news=25&no_cache=1
174 is the ID of the page where you saved the TS Code.
Modify links on the fly
Насколько я понял, в примере на страницу с ID 174 пихают этот TS код, и потом при вызове изменяют только ce=55 (идентификатор контент элемента)
Убрал в коде новости получил:
# TS CODE
# get tt_content elements
temp.record = COA
temp.record {
10 = RECORDS
10 {
tables = tt_content
source.data = GPvar:ce
if.isTrue.data = GPvar:ce
dontCheckPid = 1
}
}
page.10 >
page.10 < temp.record
Но при вызове вижу не контент элемент отдельно, а целиком страницу, где он расположен.