Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Core Labs / Archive / Auth blocks in header.tpl

admin-user-guest differentiation

medar
#1 2009-01-19 16:05
Now we have one block for auth info - <!-- BEGIN: USER -->...<!-- END: USER --> . It is inconvenient. For example, i want have caption "Logged as user" ({HEADER_LOGSTATUS}) in one place of site and usermenu ({HEADER_USER_PROFILE} , {HEADER_USER_PFS} etc) in others. Now i can't do it.

I propose add to header.php $t->parse("HEADER.USER2"); , $t->parse("HEADER.USER3"); and $t->parse("HEADER.GUEST2"); , $t->parse("HEADER.GUEST3"); for additional two auth blocks (or more).

Not an elegant solution, i see.
Ideally, we need unlimited blocks for differentiation displaying content for admin-user-guest in any tpl file. I think, without X-Template, with own solution.
rangjungyeshe.ru
esclkm
#2 2009-01-19 16:47
) I think it can made by plugin)
littledev.ru - мой маленький зарождающийся блог о котонти.
снижение стоимости программирования и снижение стоимости производства разные вещи. Первое можно скорее сравнить с раздачей работникам дешевых инструментов, чем со снижением зарплаты
Kilandor
#3 2009-01-19 18:54
Correct, this is to much of a custom feature to be in core.

Also the problem sometimes with trying to have guest/user/admin blocks as core, is that if its inside another block, then it won't work.

Which would be why its only found in header/footer (think it works in footer maybe as well)
Trustmaster
#4 2009-01-19 20:34
Sounds like an overkill.

Though, it is still the same problem for all our TPLs: optional tags and optional markup, which is hard to do without yet more blocks.
May the Source be with you!