Alternative way to build a link to a section during mass page printing

4 views
Skip to first unread message

Alexander Obuhovich

unread,
Sep 4, 2012, 10:42:08 AM9/4/12
to Development In-Portal
When you're printing a sitemap with links to all sections (pages) from a website on it you need to have solid tag to build a link to each page.
Right now there is tag <inp2:CategoryLink template='__default__'/> that does that.

Tag CategoryLink threats a section as a category and populates category_id in a link, but uses keeps template empty (if template parameter is set to "__default__") at the end.
Resulting link is valid because category url itself is a virtual template.

However if developer wants to rewrite some urls on the website and matches template name to an url he sees then nothing would happen, because as I've mentioned template name is empty.
Fortunately we have ContentPageLink that does the job. But over time (since nobody uses it) it broke. Both tags build same url at the end, however with ContentPageLink tag 't' parameter in rewrite listeners isn't empty.

Attached patch contains a fix to ContentPageLink tag.



Ready for testing.


-- 
Best Regards,

http://www.in-portal.com
http://www.alex-time.com
contentpagelink_tag_fix.patch

Dmitry A.

unread,
Sep 16, 2012, 12:40:04 AM9/16/12
to in-por...@googlegroups.com
Thanks for the patch Alex.


In other words, we should switch to use of ContentPageLink when need to link to Virtual pages/sections?


DA

Alexander Obuhovich

unread,
Sep 16, 2012, 7:53:24 AM9/16/12
to in-por...@googlegroups.com
Since this tag requires a section object to work, then it only can be used when you're printing a list of sections.

If all of a printed sections have yellow icon in "Structure & Data", then can still use CategoryLink tag as before.

Dmitry A.

unread,
Sep 16, 2012, 1:22:57 PM9/16/12
to in-por...@googlegroups.com
Thanks Alex, but I believe we are better of saying use ContentPageLink to link to sections and Link tag to link to templates so it's more structured. CategoryLink can still be there, but we need to standartilize things a bit so it's less choices and less confusion which one to use when.

Basically, I want to follow the idea - Don't Make Me Think - see my point?

DA

Alexander Obuhovich

unread,
Sep 16, 2012, 1:25:17 PM9/16/12
to in-por...@googlegroups.com
Don't think - always use m_Link tag. If if doesn't work use other options.

Dmitry A.

unread,
Sep 16, 2012, 1:30:40 PM9/16/12
to in-por...@googlegroups.com
Got it! :)

DA
Reply all
Reply to author
Forward
0 new messages